chore: fix problem of transcation beeing commited throw update the "

category variant
This commit is contained in:
mahyargdz
2025-09-21 11:45:24 +03:30
parent 3d1aa01f2e
commit 79f597cc90
23 changed files with 52 additions and 97 deletions
-2
View File
@@ -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, {