mirror of
				https://gitlab.com/MrFry/qmining-page
				synced 2025-04-01 20:23:44 +02:00 
			
		
		
		
	Sending cid as part of form, which can be modified by external userscript
This commit is contained in:
		| @@ -69,7 +69,6 @@ export default function Feedback (props) { | ||||
|   const handleSubmit = async () => { | ||||
|     if (!form.description) { | ||||
|       setResult(results.invalid) | ||||
|       return | ||||
|     } | ||||
|  | ||||
|     const rawResponse = await fetch(constants.apiUrl + 'postfeedback', { | ||||
| @@ -78,7 +77,10 @@ export default function Feedback (props) { | ||||
|         'Accept': 'application/json', | ||||
|         'Content-Type': 'application/json' | ||||
|       }, | ||||
|       body: JSON.stringify(form) | ||||
|       body: JSON.stringify({ | ||||
|         ...form, | ||||
|         cid: document.getElementById('cid').value | ||||
|       }) | ||||
|     }) | ||||
|     rawResponse.json() | ||||
|       .then((resp) => { | ||||
| @@ -194,8 +196,6 @@ export default function Feedback (props) { | ||||
|           type='text' | ||||
|           id='cid' | ||||
|           name='cid' | ||||
|           value={form.cid} | ||||
|           onChange={onChange} | ||||
|           hidden | ||||
|         /> | ||||
|         {renderResult()} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user