mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 07:28:50 +00:00
fix: review comments
This commit is contained in:
@@ -348,6 +348,7 @@ export const userServiceFactory = ({
|
|||||||
const deleteUser = async (userId: string) => {
|
const deleteUser = async (userId: string) => {
|
||||||
const user = await userDAL.deleteById(userId);
|
const user = await userDAL.deleteById(userId);
|
||||||
|
|
||||||
|
try {
|
||||||
if (user?.email) {
|
if (user?.email) {
|
||||||
// Send email to user to confirm account deletion
|
// Send email to user to confirm account deletion
|
||||||
await smtpService.sendMail({
|
await smtpService.sendMail({
|
||||||
@@ -359,6 +360,9 @@ export const userServiceFactory = ({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
logger.error(error, `Failed to send account deletion confirmation email to ${user.email}`);
|
||||||
|
}
|
||||||
|
|
||||||
return user;
|
return user;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user