Fix frontend fetch syntax

This commit is contained in:
adminsopel
2026-05-01 09:48:08 +02:00
parent 5d89b94452
commit 14445d4064

View File

@@ -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,