Compare commits

...

2 commits

Author SHA1 Message Date
Christopher (Cris) Fuhrman
ba055070a3
Merge pull request #282 from ets-cfuhrman-pfe/bug/sso-email
Some checks failed
CI/CD Pipeline for Backend / build_and_push_backend (push) Failing after 59s
CI/CD Pipeline for Nginx Router / build_and_push_nginx (push) Failing after 59s
CI/CD Pipeline for Frontend / build_and_push_frontend (push) Failing after 18s
Tests / lint-and-tests (client) (push) Failing after 1m26s
Tests / lint-and-tests (server) (push) Failing after 56s
FIX sso envoi email
2025-03-08 18:32:43 -05:00
Eddi3_As
79066179ac FIX sso envoi email 2025-03-07 14:04:30 -05:00
2 changed files with 5 additions and 3 deletions

View file

@ -73,13 +73,15 @@ class AuthManager{
console.info(`L'utilisateur '${userInfo.email}' vient de se connecter`)
}
async register(userInfos){
async register(userInfos, sendEmail=false){
console.log(userInfos);
if (!userInfos.email || !userInfos.password) {
throw new AppError(MISSING_REQUIRED_PARAMETER);
}
const user = await this.simpleregister.register(userInfos);
emailer.registerConfirmation(user.email)
if(sendEmail){
emailer.registerConfirmation(user.email);
}
return user
}
}

View file

@ -34,7 +34,7 @@ class SimpleAuth {
password: req.body.password,
roles: req.body.roles
};
let user = await self.authmanager.register(userInfos)
let user = await self.authmanager.register(userInfos, true);
if (user) {
return res.status(200).json({
message: 'User created'