Merge branch 'dev' into staging

This commit is contained in:
Vins 2024-01-12 15:12:06 +01:00
commit 94b992ab3d
2 changed files with 8 additions and 1 deletions

View File

@ -52,6 +52,11 @@ export default class UserController extends ApiController {
//Hydrate user to be able to use his contact //Hydrate user to be able to use his contact
const userHydrated = User.hydrate<User>(prismaUser, { strategy: "excludeAll" }); const userHydrated = User.hydrate<User>(prismaUser, { strategy: "excludeAll" });
if(!userHydrated.contact?.email || userHydrated.contact?.email === "") {
this.httpBadRequest(response, "Email not found");
return;
}
//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);

View File

@ -121,6 +121,8 @@ export default class IdNotService extends BaseService {
code: code, code: code,
grant_type: "authorization_code", grant_type: "authorization_code",
}); });
console.log(this.variables.IDNOT_BASE_URL + this.variables.IDNOT_CONNEXION_URL + "?" + query.toString());
const token = await fetch(this.variables.IDNOT_BASE_URL + this.variables.IDNOT_CONNEXION_URL + "?" + query, { method: "POST" }); const token = await fetch(this.variables.IDNOT_BASE_URL + this.variables.IDNOT_CONNEXION_URL + "?" + query, { method: "POST" });
if(token.status !== 200) console.error(await token.text()); if(token.status !== 200) console.error(await token.text());