frontend: fix error for 204 response
This commit is contained in:
parent
b72a445e97
commit
1f800b6d4c
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ export default async function(method, endpoint, auth=true, body=null) {
|
|||
const res = await fetch(endpoint, options);
|
||||
return {
|
||||
success: true,
|
||||
json: await res.json(),
|
||||
json: res.status === 204 ? null : await res.json(),
|
||||
ok: res.ok,
|
||||
status: res.status
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue