Add app settings model, routes, db ops, service, use settings for issueToken
This commit is contained in:
1 parent
b2bc441c7f
commit
992bf099fa
12 files changed
+210
-19
No files matched your search
@@ -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,
|
||||
};
|
||||
Reference in new issue
Block a user