flame/routes/config.js

32 lines
491 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');
router
.route('/')
2021-05-15 19:33:59 +03:00
.post(createPair)
.get(getAllPairs)
.put(updateValues);
2021-05-15 19:33:59 +03:00
router
.route('/:key')
.get(getSinglePair)
.put(updateValue)
.delete(deletePair);
router
.route('/0/css')
.get(getCss)
.put(updateCss);
2021-05-15 19:33:59 +03:00
module.exports = router;