mirror of
https://github.com/pawelmalak/flame.git
synced 2024-12-20 08:41:48 +03:00
32 lines
491 B
JavaScript
32 lines
491 B
JavaScript
const express = require('express');
|
|
const router = express.Router();
|
|
|
|
const {
|
|
createPair,
|
|
getAllPairs,
|
|
getSinglePair,
|
|
updateValue,
|
|
updateValues,
|
|
deletePair,
|
|
updateCss,
|
|
getCss,
|
|
} = require('../controllers/config');
|
|
|
|
router
|
|
.route('/')
|
|
.post(createPair)
|
|
.get(getAllPairs)
|
|
.put(updateValues);
|
|
|
|
router
|
|
.route('/:key')
|
|
.get(getSinglePair)
|
|
.put(updateValue)
|
|
.delete(deletePair);
|
|
|
|
router
|
|
.route('/0/css')
|
|
.get(getCss)
|
|
.put(updateCss);
|
|
|
|
module.exports = router; |