Fixed redis lookup.

This commit is contained in:
Mike Cao committed 2023-11-30 22:24:43 -08:00
1 parent a224a3caf3
commit 3bb82aebd8
1 file changed
+3 -1
+3 -1
View File
@@ -61,7 +61,9 @@ export const useAuth = createMiddleware(async (req, res, next) => {
} else if (redis.enabled && authKey) {
const key = await redis.client.get(authKey);
user = await getUserById(key?.userId);
if (key?.userId) {
user = await getUserById(key.userId);
}
}
if (process.env.NODE_ENV === 'development') {