2021-05-15 19:33:59 +03:00
|
|
|
const express = require('express');
|
|
|
|
const router = express.Router();
|
|
|
|
|
|
|
|
const {
|
|
|
|
createPair,
|
|
|
|
getAllPairs,
|
|
|
|
getSinglePair,
|
|
|
|
updateValue,
|
2021-05-27 14:21:11 +03:00
|
|
|
updateValues,
|
|
|
|
deletePair,
|
2021-06-22 14:07:32 +03:00
|
|
|
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-06-22 14:07:32 +03:00
|
|
|
|
2021-10-06 15:15:05 +03:00
|
|
|
module.exports = router;
|