chore: fix problem of transcation beeing commited throw update the "
category variant
This commit is contained in:
@@ -73,7 +73,6 @@ class Guard {
|
||||
(req: Request, _res: Response, next: NextFunction) =>
|
||||
async (err: Error, decoded: IUser | ISeller, info: string | object | JsonWebTokenError | TokenExpiredError): Promise<void> => {
|
||||
if (err) {
|
||||
console.log({ err });
|
||||
return next(new UnauthorizedError(AuthMessage.AuthFailed));
|
||||
}
|
||||
if (info instanceof TokenExpiredError) {
|
||||
@@ -83,7 +82,6 @@ class Guard {
|
||||
return next(new UnauthorizedError(info.message));
|
||||
}
|
||||
if (info) {
|
||||
console.log({ info });
|
||||
return next(new UnauthorizedError(AuthMessage.AuthFailed));
|
||||
}
|
||||
if (!decoded) {
|
||||
|
||||
@@ -44,7 +44,6 @@ export class ValidationMiddleware {
|
||||
excludeExtraneousValues: true,
|
||||
enableImplicitConversion: true,
|
||||
});
|
||||
console.log(validationClass);
|
||||
|
||||
// Validate the DTO instance, including nested objects
|
||||
const errors: ValidationError[] = await validate(validationClass, {
|
||||
|
||||
Reference in New Issue
Block a user