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 () => {
|
const handleSubmit = async () => {
|
||||||
if (!form.description) {
|
if (!form.description) {
|
||||||
setResult(results.invalid)
|
setResult(results.invalid)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const rawResponse = await fetch(constants.apiUrl + 'postfeedback', {
|
const rawResponse = await fetch(constants.apiUrl + 'postfeedback', {
|
||||||
@@ -78,7 +77,10 @@ export default function Feedback (props) {
|
|||||||
'Accept': 'application/json',
|
'Accept': 'application/json',
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
},
|
},
|
||||||
body: JSON.stringify(form)
|
body: JSON.stringify({
|
||||||
|
...form,
|
||||||
|
cid: document.getElementById('cid').value
|
||||||
|
})
|
||||||
})
|
})
|
||||||
rawResponse.json()
|
rawResponse.json()
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
@@ -194,8 +196,6 @@ export default function Feedback (props) {
|
|||||||
type='text'
|
type='text'
|
||||||
id='cid'
|
id='cid'
|
||||||
name='cid'
|
name='cid'
|
||||||
value={form.cid}
|
|
||||||
onChange={onChange}
|
|
||||||
hidden
|
hidden
|
||||||
/>
|
/>
|
||||||
{renderResult()}
|
{renderResult()}
|
||||||
|
Reference in New Issue
Block a user