refactor: move contentype to header

This commit is contained in:
Matilda Landström
2024-05-29 13:47:27 +02:00
parent 286227705a
commit c8247bb2e4
9 changed files with 172 additions and 174 deletions

View File

@@ -16,6 +16,7 @@ type CreateContextOptions = {
uid?: string | null
url: string
webToken?: string
contentType?: string
}
/** Use this helper for:
@@ -30,6 +31,7 @@ export function createContextInner(opts: CreateContextOptions) {
uid: opts.uid,
url: opts.url,
webToken: opts.webToken,
contentType: opts.contentType,
}
}
@@ -58,6 +60,7 @@ export function createContext() {
uid: h.get("x-uid"),
url: h.get("x-url")!,
webToken: webviewTokenCookie?.value,
contentType: h.get("x-contenttype")!,
})
}