From 98ecd404343ff1da0ab4bdc86e3e108fbd77c18b Mon Sep 17 00:00:00 2001 From: Vins Date: Tue, 23 Apr 2024 18:02:55 +0200 Subject: [PATCH] More test log --- src/app/api/idnot/UserController.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/api/idnot/UserController.ts b/src/app/api/idnot/UserController.ts index 63490c17..d5683cac 100644 --- a/src/app/api/idnot/UserController.ts +++ b/src/app/api/idnot/UserController.ts @@ -130,7 +130,11 @@ export default class UserController extends ApiController { if(!isSubscribed && userHydrated.role?.name === "admin" || userHydrated.role?.name === "super-admin"){ const manageSubscriptionRulesEntity = await this.rulesGroupsService.get({ where: { name: "Gestion de l'abonnement" }, include: { rules: true } }); + console.log("manageSubscriptionRulesEntity", manageSubscriptionRulesEntity); + const manageSubscriptionRules = RulesGroup.hydrateArray(manageSubscriptionRulesEntity, { strategy: "excludeAll" }); + console.log("manageSubscriptionRules", manageSubscriptionRules); + if(!manageSubscriptionRules[0]) return; payload.rules = manageSubscriptionRules[0].rules!.map((rule) => rule.name) || [];