Fix sign up issue

Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
Fred Boniface 2023-08-02 19:55:25 +01:00
parent 9ab6741243
commit e22af3fa35
5 changed files with 7 additions and 6 deletions

View File

@ -5,7 +5,7 @@ interface versions {
const version: versions = {
api: ['/api/v1/','/api/v2'],
app: '2023.7.9'
app: '2023.8.1'
};
module.exports = version;

View File

@ -6,7 +6,7 @@ const util = require('../utils/ldb.utils');
const san = require('../utils/sanitizer.utils');
const db = require('../services/dbAccess.services');
import { transform as staffStationTransform } from '../utils/translators/ldb/staffStation';
//import { transform as staffStationTransform } from '../utils/translators/ldb/staffStation';
const ldbKey = process.env.OWL_LDB_KEY;
const ldbsvKey = process.env.OWL_LDB_SVKEY;

View File

@ -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,