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:
parent
35637615d6
commit
35263fccad
1 changed files with 4 additions and 4 deletions
|
@ -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()}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue