Fix frontend fetch syntax
This commit is contained in:
@@ -12,7 +12,7 @@ const state = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
async function api(path, opts = {}) {
|
async function api(path, opts = {}) {
|
||||||
const res = await {fetch(U(path), {
|
const res = await fetch(U(path), {
|
||||||
credentials: 'same-origin',
|
credentials: 'same-origin',
|
||||||
headers: opts.body instanceof FormData ? {} : {'Content-Type':'application/json'},
|
headers: opts.body instanceof FormData ? {} : {'Content-Type':'application/json'},
|
||||||
...opts,
|
...opts,
|
||||||
|
|||||||
Reference in New Issue
Block a user