flame/routes/queries.js

21 lines
451 B
JavaScript
Raw Normal View History

const express = require('express');
const router = express.Router();
// middleware
const { auth, requireAuth } = require('../middleware');
const {
getQueries,
addQuery,
deleteQuery,
2021-10-11 14:55:53 +03:00
updateQuery,
} = require('../controllers/queries/');
router.route('/').post(auth, requireAuth, addQuery).get(getQueries);
router
.route('/:prefix')
.delete(auth, requireAuth, deleteQuery)
.put(auth, requireAuth, updateQuery);
module.exports = router;