main
alex 2024-02-18 19:58:00 +01:00
parent 829dd89d40
commit 7f0369b0d5
1 changed files with 11 additions and 1 deletions

View File

@ -1427,7 +1427,7 @@ export async function GetDemo(req: Request, res: Response) {
where: {
user_id: process.env.DEMO_ACCOUNT_USER_ID as string,
},
attributes: ["user_id"],
attributes: ["user_id", "email", "language"],
});
if (!demoAccount) {
@ -1435,6 +1435,16 @@ export async function GetDemo(req: Request, res: Response) {
return res.status(400).send({ err: "invalid request" });
}
rabbitmq.sendEmail(
demoAccount.email,
"dashboardSecurityInfoNewAccountLogin",
demoAccount.language,
{
os: getUserAgentOS(req),
email: demoAccount.email,
}
);
userLogger.info(demoAccount.user_id, "A demo account was requested");
saveSession(req, res, demoAccount.user_id, true);