flame/routes/config.js

22 lines
459 B
JavaScript
Raw Normal View History

2021-05-15 19:33:59 +03:00
const express = require('express');
const router = express.Router();
const {
createPair,
getAllPairs,
getSinglePair,
updateValue,
updateValues,
deletePair,
updateCss,
getCss,
2021-05-15 19:33:59 +03:00
} = require('../controllers/config');
2021-10-06 15:15:05 +03:00
router.route('/').post(createPair).get(getAllPairs).put(updateValues);
2021-05-15 19:33:59 +03:00
2021-10-06 15:15:05 +03:00
router.route('/:key').get(getSinglePair).put(updateValue).delete(deletePair);
2021-05-15 19:33:59 +03:00
2021-10-06 15:15:05 +03:00
router.route('/0/css').get(getCss).put(updateCss);
2021-10-06 15:15:05 +03:00
module.exports = router;