From 01103268c38ff85a3c82acdcbc74b1e2e6bd89c4 Mon Sep 17 00:00:00 2001 From: Puyodead1 Date: Sat, 21 Jan 2023 11:30:40 -0500 Subject: rename SMTPConfigurations to EmailConfiguration --- src/util/config/Config.ts | 4 ++-- src/util/config/types/EmailConfiguration.ts | 25 ++++++++++++++++++++++ src/util/config/types/RegisterConfiguration.ts | 5 +++-- src/util/config/types/SMTPConfiguration.ts | 25 ---------------------- src/util/config/types/index.ts | 2 +- .../types/subconfigurations/register/Email.ts | 2 +- 6 files changed, 32 insertions(+), 31 deletions(-) create mode 100644 src/util/config/types/EmailConfiguration.ts delete mode 100644 src/util/config/types/SMTPConfiguration.ts (limited to 'src') diff --git a/src/util/config/Config.ts b/src/util/config/Config.ts index 583c1489..d6f804bf 100644 --- a/src/util/config/Config.ts +++ b/src/util/config/Config.ts @@ -21,6 +21,7 @@ import { CdnConfiguration, ClientConfiguration, DefaultsConfiguration, + EmailConfiguration, EndpointConfiguration, ExternalTokensConfiguration, GeneralConfiguration, @@ -35,7 +36,6 @@ import { RegisterConfiguration, SecurityConfiguration, SentryConfiguration, - SMTPConfiguration, TemplateConfiguration, } from "../config"; @@ -59,5 +59,5 @@ export class ConfigValue { sentry: SentryConfiguration = new SentryConfiguration(); defaults: DefaultsConfiguration = new DefaultsConfiguration(); external: ExternalTokensConfiguration = new ExternalTokensConfiguration(); - smtp: SMTPConfiguration = new SMTPConfiguration(); + email: EmailConfiguration = new EmailConfiguration(); } diff --git a/src/util/config/types/EmailConfiguration.ts b/src/util/config/types/EmailConfiguration.ts new file mode 100644 index 00000000..1e4a0361 --- /dev/null +++ b/src/util/config/types/EmailConfiguration.ts @@ -0,0 +1,25 @@ +/* + Fosscord: A FOSS re-implementation and extension of the Discord.com backend. + Copyright (C) 2023 Fosscord and Fosscord Contributors + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + +export class EmailConfiguration { + host: string | null = null; + port: number | null = null; + secure: boolean | null = null; + username: string | null = null; + password: string | null = null; +} diff --git a/src/util/config/types/RegisterConfiguration.ts b/src/util/config/types/RegisterConfiguration.ts index acbaa2d5..689baa85 100644 --- a/src/util/config/types/RegisterConfiguration.ts +++ b/src/util/config/types/RegisterConfiguration.ts @@ -18,12 +18,13 @@ import { DateOfBirthConfiguration, - EmailConfiguration, PasswordConfiguration, + RegistrationEmailConfiguration, } from "."; export class RegisterConfiguration { - email: EmailConfiguration = new EmailConfiguration(); + email: RegistrationEmailConfiguration = + new RegistrationEmailConfiguration(); dateOfBirth: DateOfBirthConfiguration = new DateOfBirthConfiguration(); password: PasswordConfiguration = new PasswordConfiguration(); disabled: boolean = false; diff --git a/src/util/config/types/SMTPConfiguration.ts b/src/util/config/types/SMTPConfiguration.ts deleted file mode 100644 index 11eb9e14..00000000 --- a/src/util/config/types/SMTPConfiguration.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - Fosscord: A FOSS re-implementation and extension of the Discord.com backend. - Copyright (C) 2023 Fosscord and Fosscord Contributors - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published - by the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . -*/ - -export class SMTPConfiguration { - host: string | null = null; - port: number | null = null; - secure: boolean | null = null; - username: string | null = null; - password: string | null = null; -} diff --git a/src/util/config/types/index.ts b/src/util/config/types/index.ts index 3d8ed6df..1431c128 100644 --- a/src/util/config/types/index.ts +++ b/src/util/config/types/index.ts @@ -20,6 +20,7 @@ export * from "./ApiConfiguration"; export * from "./CdnConfiguration"; export * from "./ClientConfiguration"; export * from "./DefaultsConfiguration"; +export * from "./EmailConfiguration"; export * from "./EndpointConfiguration"; export * from "./ExternalTokensConfiguration"; export * from "./GeneralConfiguration"; @@ -34,6 +35,5 @@ export * from "./RegionConfiguration"; export * from "./RegisterConfiguration"; export * from "./SecurityConfiguration"; export * from "./SentryConfiguration"; -export * from "./SMTPConfiguration"; export * from "./subconfigurations"; export * from "./TemplateConfiguration"; diff --git a/src/util/config/types/subconfigurations/register/Email.ts b/src/util/config/types/subconfigurations/register/Email.ts index 478dc974..4f95caf1 100644 --- a/src/util/config/types/subconfigurations/register/Email.ts +++ b/src/util/config/types/subconfigurations/register/Email.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -export class EmailConfiguration { +export class RegistrationEmailConfiguration { required: boolean = false; allowlist: boolean = false; blocklist: boolean = true; -- cgit 1.4.1