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');
|
|
|
|
|
|
|
|
router
|
2021-06-07 13:17:10 +03:00
|
|
|
.route('/')
|
2021-05-15 19:33:59 +03:00
|
|
|
.post(createPair)
|
2021-05-27 14:21:11 +03:00
|
|
|
.get(getAllPairs)
|
|
|
|
.put(updateValues);
|
2021-05-15 19:33:59 +03:00
|
|
|
|
|
|
|
router
|
|
|
|
.route('/:key')
|
|
|
|
.get(getSinglePair)
|
|
|
|
.put(updateValue)
|
|
|
|
.delete(deletePair);
|
|
|
|
|
2021-06-22 14:07:32 +03:00
|
|
|
router
|
|
|
|
.route('/0/css')
|
|
|
|
.get(getCss)
|
|
|
|
.put(updateCss);
|
|
|
|
|
2021-05-15 19:33:59 +03:00
|
|
|
module.exports = router;
|