Updated prisma and redis clients.
This commit is contained in:
@@ -2,10 +2,10 @@ import { createMiddleware, unauthorized, badRequest, parseSecureToken } from 'ne
|
||||
import debug from 'debug';
|
||||
import cors from 'cors';
|
||||
import { validate } from 'uuid';
|
||||
import redis from '@umami/redis-client';
|
||||
import { findSession } from 'lib/session';
|
||||
import { getAuthToken, parseShareToken } from 'lib/auth';
|
||||
import { secret } from 'lib/crypto';
|
||||
import redis from 'lib/redis';
|
||||
import { ROLES } from 'lib/constants';
|
||||
import { getUser } from '../queries';
|
||||
|
||||
@@ -17,7 +17,7 @@ export const useSession = createMiddleware(async (req, res, next) => {
|
||||
const session = await findSession(req);
|
||||
|
||||
if (!session) {
|
||||
log('useSession:session-not-found');
|
||||
log('useSession: Session not found');
|
||||
return badRequest(res);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ export const useAuth = createMiddleware(async (req, res, next) => {
|
||||
log({ token, payload, user, shareToken });
|
||||
|
||||
if (!user && !shareToken) {
|
||||
log('useAuth:user-not-authorized');
|
||||
log('useAuth: User not authorized');
|
||||
return unauthorized(res);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user