test: expand authenticated admin workflows
Quality / test (push) Canceled after 0s

This commit is contained in:
2026-09-10 02:01:00 -04:00
parent 4f0e3d89f6
commit fce30513d4
5 changed files with 56 additions and 2 deletions
@@ -4,7 +4,10 @@ async function request(path, options = {}) {
const response = await fetch(`${apiBaseUrl}${path}`, {
credentials: 'include',
...options,
headers: { 'content-type': 'application/json', ...options.headers },
headers: {
...(options.body ? { 'content-type': 'application/json' } : {}),
...options.headers,
},
});
const payload = await response.json().catch(() => null);
if (!response.ok) throw new Error(payload?.error?.message ?? 'Saved view request failed.');