@@ -2,7 +2,8 @@ const logs = require('../utils/logs.utils');
|
||||
const crypt = require('crypto');
|
||||
const db = require('../services/dbAccess.services');
|
||||
const fs = require('fs/promises');
|
||||
const minify = require('../utils/minify.utils');
|
||||
|
||||
import { minifyMail } from "./minify.utils";
|
||||
|
||||
// Checks users registration key against issued keys
|
||||
async function isAuthed(uuid: string) { // Needs testing
|
||||
@@ -37,7 +38,7 @@ async function generateConfirmationEmail(eml: string, uuid: string) {
|
||||
try {
|
||||
const htmlTpl = await fs.readFile('mail-templates/register.html', 'utf-8');
|
||||
const htmlStr = htmlTpl.replace(/>>ACCESSCODE<</g, uuid);
|
||||
const htmlMin = await minify(htmlStr);
|
||||
const htmlMin = await minifyMail(htmlStr);
|
||||
const txtTpl = fs.readFile('mail-templates/register.txt', 'utf-8');
|
||||
return {
|
||||
to: eml,
|
||||
|
||||
@@ -109,4 +109,4 @@ function transformUnspecifiedDateTime(input: string): Date | undefined {
|
||||
}
|
||||
const date = tz(input, "Europe/London");
|
||||
return date.toDate()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user