use config file instead of env

This commit is contained in:
Milo Schwartz 2024-10-12 18:21:31 -04:00
parent 6fb569e2cd
commit d9ae322e2a
No known key found for this signature in database
19 changed files with 189 additions and 209 deletions

View file

@ -24,8 +24,6 @@ export async function verifyUser(
): Promise<any> {
const parsedBody = verifyUserBody.safeParse(req.query);
logger.debug("Parsed body", parsedBody);
if (!parsedBody.success) {
return next(
createHttpError(
@ -40,9 +38,6 @@ export async function verifyUser(
try {
const { session, user } = await lucia.validateSession(sessionId);
logger.debug("Session", session);
logger.debug("User", user);
if (!session || !user) {
return next(
createHttpError(HttpCode.UNAUTHORIZED, "Invalid session"),