From 37934c0677f673ef90dc4411ec166285cdd98dcb Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Thu, 7 Sep 2023 17:25:33 +0530 Subject: [PATCH] fix fmt --- Workers/DataMigrations/Index.ts | 2 +- .../DataMigrations/UpdateGlobalCongfigFromEnv.ts | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Workers/DataMigrations/Index.ts b/Workers/DataMigrations/Index.ts index b9c0e2f80b..925a5ac193 100644 --- a/Workers/DataMigrations/Index.ts +++ b/Workers/DataMigrations/Index.ts @@ -18,7 +18,7 @@ const DataMigrations: Array = [ new UpdateActiveMonitorCountToBillingProvider(), new AddMonitoringDatesToMonitor(), new AddDefaultGlobalConfig(), - new UpdateGlobalConfigFromEnv() + new UpdateGlobalConfigFromEnv(), ]; export default DataMigrations; diff --git a/Workers/DataMigrations/UpdateGlobalCongfigFromEnv.ts b/Workers/DataMigrations/UpdateGlobalCongfigFromEnv.ts index be936c3270..f542cf1db9 100644 --- a/Workers/DataMigrations/UpdateGlobalCongfigFromEnv.ts +++ b/Workers/DataMigrations/UpdateGlobalCongfigFromEnv.ts @@ -12,20 +12,18 @@ export default class UpdateGlobalConfigFromEnv extends DataMigrationBase { // get all the users with email isVerified true. await GlobalConfigService.updateOneById({ - id: ObjectID.getZeroObjectID(), + id: ObjectID.getZeroObjectID(), data: { - // Update Twilio twilioAccountSID: process.env['TWILIO_ACCOUNT_SID'] || '', twilioAuthToken: process.env['TWILIO_AUTH_TOKEN'] || '', twilioPhoneNumber: process.env['TWILIO_PHONE_NUMBER'] || '', - + // Update host host: process.env['DOMAIN'] || 'localhost', useHttps: process.env['HTTP_PROTOCOL'] === 'https', - // Update SMTP smtpUsername: process.env['SMTP_USERNAME'] || '', smtpPassword: process.env['SMTP_PASSWORD'] || '', @@ -34,13 +32,11 @@ export default class UpdateGlobalConfigFromEnv extends DataMigrationBase { isSMTPSecure: process.env['SMTP_IS_SECURE'] === 'true', smtpFromEmail: process.env['SMTP_FROM_EMAIL'] || '', smtpFromName: process.env['SMTP_FROM_NAME'] || '', - }, - props: - { + props: { isRoot: true, - } - }) + }, + }); } public override async rollback(): Promise {