mirror of
https://github.com/pawelmalak/flame.git
synced 2024-12-20 16:51:47 +03:00
23 lines
392 B
JavaScript
23 lines
392 B
JavaScript
const express = require('express');
|
|
const router = express.Router();
|
|
|
|
const {
|
|
createCategory,
|
|
getCategories,
|
|
getCategory,
|
|
updateCategory,
|
|
deleteCategory
|
|
} = require('../controllers/category');
|
|
|
|
router
|
|
.route('/')
|
|
.post(createCategory)
|
|
.get(getCategories);
|
|
|
|
router
|
|
.route('/:id')
|
|
.get(getCategory)
|
|
.put(updateCategory)
|
|
.delete(deleteCategory);
|
|
|
|
module.exports = router; |