fix architecture and write new tests

This commit is contained in:
root
2026-06-10 00:40:19 -04:00
parent 560da1cadf
commit 80a597bc10
377 changed files with 84020 additions and 1337 deletions
@@ -467,14 +467,13 @@ export default function AdminBillingPage() {
)
async function api<T>(path: string, init?: RequestInit): Promise<T> {
const token = localStorage.getItem('admin_token')
const res = await fetch(`${ADMIN_API_BASE}${path}`, {
...init,
headers: {
'Content-Type': 'application/json',
...(token ? { Authorization: `Bearer ${token}` } : {}),
...(init?.headers ?? {}),
},
credentials: 'include',
cache: 'no-store',
})
if (res.headers.get('content-type')?.includes('application/pdf')) {