mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-01 12:29:35 +01:00
Fixed redis lookup.
This commit is contained in:
parent
a224a3caf3
commit
3bb82aebd8
@ -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') {
|
||||
|
Loading…
Reference in New Issue
Block a user