diff --git a/src/controllers/userController.ts b/src/controllers/userController.ts index 78d24dd..a099ff0 100644 --- a/src/controllers/userController.ts +++ b/src/controllers/userController.ts @@ -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);