refactor: move contentype to header
This commit is contained in:
@@ -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")!,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user