pis #12

Merged
fred.boniface merged 95 commits from pis into main 2023-05-06 21:54:51 +01:00
1 changed files with 3 additions and 9 deletions
Showing only changes of commit 9e52faa1bb - Show all commits

View File

@ -15,17 +15,11 @@ async function createRegKey(eml){
if (await message == false) { // This error should be handled in the upstream function
const err = new Error("Message generation error");
log.out(`registerServices.createRegKey: Error generating registration email`, "err")
return 500
return 500;
}
try { // Send the email
await mail.send(message);
} catch(err){ // HTTP 500 if sen failed
return 500
}
return 201 // These returns still need handling
} else {
return 401 // As above
return await mail.send(message);
}
return 401;
}
async function regUser(req) {