refactor: standardize access token variable naming across routes

This commit is contained in:
Ardeman
2025-03-12 20:46:54 +08:00
parent f423f3e1c0
commit 1ce5a2130b
22 changed files with 127 additions and 94 deletions
+3 -7
View File
@@ -27,13 +27,9 @@ export const action = async ({ request }: Route.ActionArgs) => {
}
const { data: loginData } = await staffLoginRequest(payload)
const { token } = loginData
const { data: staffData } = await getStaff({
accessToken: token,
})
const tokenCookie = generateStaffTokenCookie({
token,
})
const { token: accessToken } = loginData
const { data: staffData } = await getStaff({ accessToken })
const tokenCookie = generateStaffTokenCookie({ accessToken })
const headers = new Headers()
headers.append('Set-Cookie', await tokenCookie)