feat: add trusted ticket intake workspace

This commit is contained in:
hailin
2026-07-16 19:37:37 +08:00
parent bcd6de4609
commit 5db4c625ed
8 changed files with 522 additions and 141 deletions

View File

@@ -43,7 +43,7 @@ async function getCsrfToken() {
export async function apiRequest<T>(path: string, init?: RequestInit): Promise<T> {
const headers = new Headers(init?.headers)
if (init?.body && !headers.has('content-type')) {
if (init?.body && !(init.body instanceof FormData) && !headers.has('content-type')) {
headers.set('content-type', 'application/json')
}
const method = init?.method?.toUpperCase() ?? 'GET'