feat: refactor admin authentication to staff authentication with updated cookie handling
This commit is contained in:
+3
-3
@@ -1,16 +1,16 @@
|
||||
import { adminTokenCookieConfig, userTokenCookieConfig } from './cookie.server'
|
||||
import { staffTokenCookieConfig, userTokenCookieConfig } from './cookie.server'
|
||||
|
||||
export const handleCookie = async (request: Request) => {
|
||||
const headers = request.headers
|
||||
const userToken = (await userTokenCookieConfig.parse(
|
||||
headers.get('Cookie'),
|
||||
)) as string
|
||||
const adminToken = (await adminTokenCookieConfig.parse(
|
||||
const staffToken = (await staffTokenCookieConfig.parse(
|
||||
headers.get('Cookie'),
|
||||
)) as string
|
||||
|
||||
return {
|
||||
userToken,
|
||||
adminToken,
|
||||
staffToken,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user