mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-19 11:39:36 +02:00
Changed config api. Split config controllers into separate files. Split bookmarks controllers into separate files
This commit is contained in:
parent
76e50624e7
commit
cfb471e578
23 changed files with 579 additions and 602 deletions
16
controllers/config/getConfig.js
Normal file
16
controllers/config/getConfig.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
const asyncWrapper = require('../../middleware/asyncWrapper');
|
||||
const loadConfig = require('../../utils/loadConfig');
|
||||
|
||||
// @desc Get config
|
||||
// @route GET /api/config
|
||||
// @access Public
|
||||
const getConfig = asyncWrapper(async (req, res, next) => {
|
||||
const config = await loadConfig();
|
||||
|
||||
res.status(200).json({
|
||||
success: true,
|
||||
data: config,
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = getConfig;
|
Loading…
Add table
Add a link
Reference in a new issue