Merge branch 'dev' into staging
This commit is contained in:
commit
7ac5be9ecc
@ -5,7 +5,6 @@ import { Service } from "typedi";
|
|||||||
import AuthService, { IUserJwtPayload } from "@Services/common/AuthService/AuthService";
|
import AuthService, { IUserJwtPayload } from "@Services/common/AuthService/AuthService";
|
||||||
|
|
||||||
import IdNotService from "@Services/common/IdNotService/IdNotService";
|
import IdNotService from "@Services/common/IdNotService/IdNotService";
|
||||||
import WhitelistService from "@Services/common/WhitelistService/WhitelistService";
|
|
||||||
import User from "le-coffre-resources/dist/Admin";
|
import User from "le-coffre-resources/dist/Admin";
|
||||||
import UsersService from "@Services/super-admin/UsersService/UsersService";
|
import UsersService from "@Services/super-admin/UsersService/UsersService";
|
||||||
import SubscriptionsService from "@Services/admin/SubscriptionsService/SubscriptionsService.ts";
|
import SubscriptionsService from "@Services/admin/SubscriptionsService/SubscriptionsService.ts";
|
||||||
@ -16,7 +15,7 @@ import { EType } from "le-coffre-resources/dist/Admin/Subscription";
|
|||||||
@Controller()
|
@Controller()
|
||||||
@Service()
|
@Service()
|
||||||
export default class UserController extends ApiController {
|
export default class UserController extends ApiController {
|
||||||
constructor(private authService: AuthService, private idNotService: IdNotService, private whitelistService: WhitelistService, private userService: UsersService, private subscriptionsService: SubscriptionsService, private seatsService: SeatsService) {
|
constructor(private authService: AuthService, private idNotService: IdNotService, private userService: UsersService, private subscriptionsService: SubscriptionsService, private seatsService: SeatsService) {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,17 +103,17 @@ export default class UserController extends ApiController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Check if user is whitelisted
|
//Check if user is whitelisted
|
||||||
const isWhitelisted = await this.whitelistService.getByEmail(userHydrated.contact!.email);
|
// const isWhitelisted = await this.whitelistService.getByEmail(userHydrated.contact!.email);
|
||||||
|
|
||||||
|
|
||||||
//When we'll switch to idNotId whitelisting
|
//When we'll switch to idNotId whitelisting
|
||||||
// const isWhitelisted = await this.userWhitelistService.getByIdNotId(user.idNot);
|
// const isWhitelisted = await this.userWhitelistService.getByIdNotId(user.idNot);
|
||||||
|
|
||||||
//If not whitelisted, return 409 Not whitelisted
|
//If not whitelisted, return 409 Not whitelisted
|
||||||
if (!isWhitelisted || isWhitelisted.length === 0) {
|
// if (!isWhitelisted || isWhitelisted.length === 0) {
|
||||||
this.httpNotWhitelisted(response);
|
// this.httpNotWhitelisted(response);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
await this.idNotService.updateOffice(user.office_uid);
|
await this.idNotService.updateOffice(user.office_uid);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user