flame/routes/config.js

25 lines
407 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,
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);
module.exports = router;