Add app settings model, routes, db ops, service, use settings for issueToken

This commit is contained in:
Alex Holliday committed 2024-09-26 13:41:50 +08:00
1 parent b2bc441c7f
commit 992bf099fa
12 files changed
+210 -19

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
const AppSettings = require("../../../models/AppSettings");
const SERVICE_NAME = "SettingsModule";
const getAppSettings = async () => {
try {
const settings = AppSettings.findOne();
return settings;
} catch (error) {
error.service = SERVICE_NAME;
error.method = "getSettings";
throw error;
}
};
module.exports = {
getAppSettings,
};