validating cron when creating or updating input

This commit is contained in:
Gabriel Rosa
2022-05-31 11:34:28 -03:00
parent 4e2e6787a4
commit d3bcbdc43c
6 changed files with 78 additions and 12 deletions
+4 -3
View File
@@ -32,9 +32,10 @@ export class LoggerMiddleware implements NestMiddleware {
const permissions = jwtDecoded.user.permissions;
const clienId = jwtDecoded.user.customerId;
const clientId = jwtDecoded.user.customerId;
const customer = jwtDecoded.user.customer;
const userId = jwtDecoded.user.id;
const customer_tier = jwtDecoded.user.customer_tier;
await verifyToken(accessToken);
@@ -55,11 +56,11 @@ export class LoggerMiddleware implements NestMiddleware {
if (havePermission) {
request.body.info = {
customer_id: clienId,
customer_id: clientId,
user_id: userId,
customer,
customer_tier,
};
next();
} else {
throw new ForbiddenException();