pis #12

Merged
fred.boniface merged 95 commits from pis into main 2023-05-06 21:54:51 +01:00
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 if (await message == false) { // This error should be handled in the upstream function
const err = new Error("Message generation error"); const err = new Error("Message generation error");
log.out(`registerServices.createRegKey: Error generating registration email`, "err") log.out(`registerServices.createRegKey: Error generating registration email`, "err")
return 500 return 500;
} }
try { // Send the email return await mail.send(message);
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 401;
} }
async function regUser(req) { async function regUser(req) {