email settings
This commit is contained in:
1 parent
819c0ca05a
commit
3faff5dc54
16 files changed
+665
-33
No files matched your search
@@ -15,12 +15,18 @@ class SettingsService implements ISettingsService {
|
||||
}
|
||||
|
||||
get = async (): Promise<ISystemSettings> => {
|
||||
let settings = await SystemSettings.findById("global");
|
||||
let settings = await SystemSettings.findById("global").select(
|
||||
"-_id -__v -createdAt -updatedAt"
|
||||
);
|
||||
|
||||
if (!settings) {
|
||||
settings = await SystemSettings.create({ _id: "global" });
|
||||
await SystemSettings.create({ _id: "global" });
|
||||
}
|
||||
|
||||
settings = await SystemSettings.findById("global").select(
|
||||
"-_id -__v -createdAt -updatedAt"
|
||||
);
|
||||
|
||||
if (!settings) {
|
||||
throw new ApiError("Unable to load system settings", 500);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user