From cd4c32702e94ce5edc34b159c60147f42dbcb2ed Mon Sep 17 00:00:00 2001 From: Vins Date: Wed, 24 Apr 2024 10:32:26 +0200 Subject: [PATCH] logs --- src/app/api/idnot/UserController.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/api/idnot/UserController.ts b/src/app/api/idnot/UserController.ts index fdaa9096..5df8d371 100644 --- a/src/app/api/idnot/UserController.ts +++ b/src/app/api/idnot/UserController.ts @@ -114,14 +114,17 @@ export default class UserController extends ApiController { // return; // } - await this.idNotService.updateOffice(user.office_uid); + await this.idNotService.updateOffice(user.office_uid); const payload = await this.authService.getUserJwtPayload(user.idNot); if(!payload) return; - + console.log(isSubscribed, userHydrated.role?.name); + if(!isSubscribed && userHydrated.role?.name === "admin" || userHydrated.role?.name === "super-admin"){ const manageSubscriptionRulesEntity = await this.rulesGroupsService.get({ where: { uid: "94343601-04c8-44ef-afb9-3047597528a9" }, include: { rules: true } }); + console.log(manageSubscriptionRulesEntity); + const manageSubscriptionRules = RulesGroup.hydrateArray(manageSubscriptionRulesEntity, { strategy: "excludeAll" }); if(!manageSubscriptionRules[0]) return;