ui: Add Accept header to retrieve JSON errors
This commit is contained in:
parent
de03863f1b
commit
bd8db24997
7 changed files with 11 additions and 5 deletions
|
|
@ -43,6 +43,7 @@
|
|||
"submit/" + exercice.id,
|
||||
{
|
||||
method: "POST",
|
||||
headers: {'Accept': 'application/json'},
|
||||
body: JSON.stringify(responses),
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
"openhint/" + exercice.id,
|
||||
{
|
||||
method: "POST",
|
||||
headers: {'Accept': 'application/json'},
|
||||
body: JSON.stringify({ id: hint.id }),
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
"wantchoices/" + exercice_id,
|
||||
{
|
||||
method: "POST",
|
||||
headers: {'Accept': 'application/json'},
|
||||
body: JSON.stringify({ id: Number(flag.id) }),
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@
|
|||
|
||||
const response = await fetch('chname', {
|
||||
method: "POST",
|
||||
headers: {'Accept': 'application/json'},
|
||||
body: JSON.stringify({newName: newTeamName}),
|
||||
});
|
||||
|
||||
|
|
|
|||
Reference in a new issue