Fix sign up issue
Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
parent
9ab6741243
commit
e22af3fa35
@ -5,7 +5,7 @@ interface versions {
|
|||||||
|
|
||||||
const version: versions = {
|
const version: versions = {
|
||||||
api: ['/api/v1/','/api/v2'],
|
api: ['/api/v1/','/api/v2'],
|
||||||
app: '2023.7.9'
|
app: '2023.8.1'
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = version;
|
module.exports = version;
|
||||||
|
@ -6,7 +6,7 @@ const util = require('../utils/ldb.utils');
|
|||||||
const san = require('../utils/sanitizer.utils');
|
const san = require('../utils/sanitizer.utils');
|
||||||
const db = require('../services/dbAccess.services');
|
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 ldbKey = process.env.OWL_LDB_KEY;
|
||||||
const ldbsvKey = process.env.OWL_LDB_SVKEY;
|
const ldbsvKey = process.env.OWL_LDB_SVKEY;
|
||||||
|
@ -2,7 +2,8 @@ const logs = require('../utils/logs.utils');
|
|||||||
const crypt = require('crypto');
|
const crypt = require('crypto');
|
||||||
const db = require('../services/dbAccess.services');
|
const db = require('../services/dbAccess.services');
|
||||||
const fs = require('fs/promises');
|
const fs = require('fs/promises');
|
||||||
const minify = require('../utils/minify.utils');
|
|
||||||
|
import { minifyMail } from "./minify.utils";
|
||||||
|
|
||||||
// Checks users registration key against issued keys
|
// Checks users registration key against issued keys
|
||||||
async function isAuthed(uuid: string) { // Needs testing
|
async function isAuthed(uuid: string) { // Needs testing
|
||||||
@ -37,7 +38,7 @@ async function generateConfirmationEmail(eml: string, uuid: string) {
|
|||||||
try {
|
try {
|
||||||
const htmlTpl = await fs.readFile('mail-templates/register.html', 'utf-8');
|
const htmlTpl = await fs.readFile('mail-templates/register.html', 'utf-8');
|
||||||
const htmlStr = htmlTpl.replace(/>>ACCESSCODE<</g, uuid);
|
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');
|
const txtTpl = fs.readFile('mail-templates/register.txt', 'utf-8');
|
||||||
return {
|
return {
|
||||||
to: eml,
|
to: eml,
|
||||||
|
@ -109,4 +109,4 @@ function transformUnspecifiedDateTime(input: string): Date | undefined {
|
|||||||
}
|
}
|
||||||
const date = tz(input, "Europe/London");
|
const date = tz(input, "Europe/London");
|
||||||
return date.toDate()
|
return date.toDate()
|
||||||
}
|
}
|
||||||
|
@ -18,4 +18,4 @@ describe('transform', () => {
|
|||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user