refactor: enum casing (#19946)
This commit is contained in:
@@ -13,13 +13,13 @@ export const respondWithCookie = <T>(res: Response, body: T, { isSecure, values
|
||||
};
|
||||
|
||||
const cookieOptions: Record<ImmichCookie, CookieOptions> = {
|
||||
[ImmichCookie.AUTH_TYPE]: defaults,
|
||||
[ImmichCookie.ACCESS_TOKEN]: defaults,
|
||||
[ImmichCookie.OAUTH_STATE]: defaults,
|
||||
[ImmichCookie.OAUTH_CODE_VERIFIER]: defaults,
|
||||
[ImmichCookie.AuthType]: defaults,
|
||||
[ImmichCookie.AccessToken]: defaults,
|
||||
[ImmichCookie.OAuthState]: defaults,
|
||||
[ImmichCookie.OAuthCodeVerifier]: defaults,
|
||||
// no httpOnly so that the client can know the auth state
|
||||
[ImmichCookie.IS_AUTHENTICATED]: { ...defaults, httpOnly: false },
|
||||
[ImmichCookie.SHARED_LINK_TOKEN]: { ...defaults, maxAge: Duration.fromObject({ days: 1 }).toMillis() },
|
||||
[ImmichCookie.IsAuthenticated]: { ...defaults, httpOnly: false },
|
||||
[ImmichCookie.SharedLinkToken]: { ...defaults, maxAge: Duration.fromObject({ days: 1 }).toMillis() },
|
||||
};
|
||||
|
||||
for (const { key, value } of values) {
|
||||
|
||||
Reference in New Issue
Block a user