Improvements

This commit is contained in:
ricardo 2022-04-14 18:09:31 -04:00
parent f8dd4159a8
commit f8d76d66c3
2 changed files with 7 additions and 1 deletions

View file

@ -108,7 +108,7 @@ const getMailerInstance = async (
} catch (error) {
if (error instanceof Error) {
return res.status(500).json({
message: 'Email sending must be set up in order to request a password reset email',
message: 'There is a problem with your SMTP setup',
});
}
}

View file

@ -66,6 +66,12 @@ export = {
includeRole,
});
if (apiKeyUserOwner.id === idToDelete) {
return res.status(400).json({
message: 'Cannot delete your own user',
});
}
if (!users?.length || (transferId !== '' && users.length !== 2)) {
return res.status(400).json({
message: