From f80f5b493864231178da31be62f92da5ede5a8bf Mon Sep 17 00:00:00 2001 From: Stefan-5422 <32109571+Stefan-5422@users.noreply.github.com> Date: Mon, 30 May 2022 19:42:35 +0200 Subject: [PATCH] Remove leftover TODOs --- src/Controllers/user_auth.controller.ts | 1 - src/lib/mail.ts | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/Controllers/user_auth.controller.ts b/src/Controllers/user_auth.controller.ts index 405bf97..831a312 100644 --- a/src/Controllers/user_auth.controller.ts +++ b/src/Controllers/user_auth.controller.ts @@ -108,7 +108,6 @@ export const requestToken = async (req: Request, res: Response) => { res.status(200).json({ type: "sucess", message: "Email sent!" }); }; -//TODO: This should be a get request with the code as a veriable part in the url export const verifyEmail = async (req: Request, res: Response) => { const { code } = req.params || {}; diff --git a/src/lib/mail.ts b/src/lib/mail.ts index 86b83c8..eda1b55 100644 --- a/src/lib/mail.ts +++ b/src/lib/mail.ts @@ -5,7 +5,6 @@ import nodemailer from "nodemailer"; import SMTPTransport from "nodemailer/lib/smtp-transport"; import mjml from "./mjml"; -import { randomUUID } from "crypto"; import logger from "../Middleware/error/logger"; export let mailAccount = { user: process.env.MAILUSER + "@mail." + process.env.DOMAIN, pass: process.env.MAILPASSWORD }; @@ -67,7 +66,6 @@ const sendMail = async (from: string, to: string, subject: string, text?: string export const verificationMail = async (to: string, eventName: string, verificationLink: string) => { const raw = mjml.getTemplate("emailVerification"); - //TODO: Set the verification link to the correct endpoint verificationLink = "https://" + (process.env.DOMAIN ?? "localhost:3000") + "/api/users/verify/" + verificationLink; const message = Handlebars.compile(raw);