fix refactor

This commit is contained in:
Simon Larsen
2023-05-17 20:15:07 +01:00
parent f3eb085986
commit ac9eb27691
5 changed files with 8 additions and 10 deletions

View File

@@ -118,7 +118,7 @@ const RegisterPage: FunctionComponent = () => {
title: 'Confirm Password',
overideFieldKey: 'confirmPassword',
required: true,
forceShow: true
forceShow: true,
},
]}
apiUrl={apiUrl}

View File

@@ -9,7 +9,7 @@ import SMTPConfigAPI from './API/SMTPConfig';
import logger from 'CommonServer/Utils/Logger';
import { PostgresAppInstance } from 'CommonServer/Infrastructure/PostgresDatabase';
// import handlebars loader.
// import handlebars loader.
import './Utils/Handlebars';
const APP_NAME: string = 'mail';

View File

@@ -18,7 +18,6 @@ import { IsDevelopment } from 'CommonServer/Config';
import { SendGridApiKey } from '../Config';
import SendgridMail, { MailDataRequired } from '@sendgrid/mail';
export default class MailService {
public static isSMTPConfigValid(obj: JSONObject): boolean {
if (!obj['SMTP_USERNAME']) {

View File

@@ -1,10 +1,8 @@
import Handlebars from 'handlebars';
import fsp from 'fs/promises';
import Path from 'path';
import logger from 'CommonServer/Utils/Logger';
const loadPartials: Function = async (): Promise<void> => {
// get all partials in the partial folder and comile then and register then as partials in handlebars.
const partialsDir: string = Path.resolve(
@@ -48,9 +46,8 @@ Handlebars.registerHelper('ifCond', function (v1, v2, options) {
return options.inverse(this);
});
Handlebars.registerHelper('concat', function (v1, v2) {
// contact v1 and v2
Handlebars.registerHelper('concat', (v1, v2) => {
// contact v1 and v2
return v1 + v2;
});
@@ -61,4 +58,4 @@ Handlebars.registerHelper('ifNotCond', function (v1, v2, options) {
}
//@ts-ignore
return options.inverse(this);
});
});

View File

@@ -256,7 +256,9 @@ RunCron(
)
.toString(),
},
subject: statusPageName + ' - New note has been added to an incident',
subject:
statusPageName +
' - New note has been added to an incident',
},
ProjectSmtpConfigService.toEmailServer(
statuspage.smtpConfig