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,20 @@
|
||||
const { successMessages } = require("../utils/messages");
|
||||
const SERVICE_NAME = "SettingsController";
|
||||
|
||||
const getAppSettings = async (req, res, next) => {
|
||||
try {
|
||||
const settings = await req.db.getAppSettings();
|
||||
return res.status(200).json({
|
||||
success: true,
|
||||
msg: successMessages.GET_APP_SETTINGS,
|
||||
data: settings,
|
||||
});
|
||||
} catch (error) {
|
||||
error.service === undefined ? (error.service = SERVICE_NAME) : null;
|
||||
error.method === undefined ? (error.method = "getAppSettings") : null;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
getAppSettings,
|
||||
};
|
||||
Reference in new issue
Block a user