2021-05-15 16:33:59 +00:00
|
|
|
const express = require('express');
|
|
|
|
const router = express.Router();
|
|
|
|
|
2021-11-11 15:18:31 +00:00
|
|
|
// middleware
|
|
|
|
const { auth, requireAuth } = require('../middleware');
|
|
|
|
|
2021-05-15 16:33:59 +00:00
|
|
|
const {
|
2021-10-22 12:00:38 +00:00
|
|
|
getCSS,
|
|
|
|
updateCSS,
|
|
|
|
getConfig,
|
|
|
|
updateConfig,
|
2021-05-15 16:33:59 +00:00
|
|
|
} = require('../controllers/config');
|
|
|
|
|
2021-11-11 15:18:31 +00:00
|
|
|
router.route('/').get(getConfig).put(auth, requireAuth, updateConfig);
|
2021-05-15 16:33:59 +00:00
|
|
|
|
2021-11-11 15:18:31 +00:00
|
|
|
router.route('/0/css').get(getCSS).put(auth, requireAuth, updateCSS);
|
2021-06-22 11:07:32 +00:00
|
|
|
|
2021-10-06 12:15:05 +00:00
|
|
|
module.exports = router;
|