fix
This commit is contained in:
parent
84d36140fd
commit
9701ea6301
@ -102,11 +102,6 @@ export default class UserController extends ApiController {
|
||||
}
|
||||
}
|
||||
|
||||
if (!isSubscribed) {
|
||||
this.httpUnauthorized(response, "User not subscribed");
|
||||
return;
|
||||
}
|
||||
|
||||
//Check if user is whitelisted
|
||||
// const isWhitelisted = await this.whitelistService.getByEmail(userHydrated.contact!.email);
|
||||
|
||||
@ -131,6 +126,12 @@ export default class UserController extends ApiController {
|
||||
if(!manageSubscriptionRules[0]) return;
|
||||
|
||||
payload.rules = manageSubscriptionRules[0].rules!.map((rule) => rule.name) || [];
|
||||
isSubscribed = true;
|
||||
}
|
||||
|
||||
if (!isSubscribed) {
|
||||
this.httpUnauthorized(response, "User not subscribed");
|
||||
return;
|
||||
}
|
||||
|
||||
const accessToken = this.authService.generateAccessToken(payload);
|
||||
|
Loading…
x
Reference in New Issue
Block a user