mirror of
https://github.com/pawelmalak/flame.git
synced 2024-12-24 10:42:40 +03:00
22 lines
466 B
JavaScript
22 lines
466 B
JavaScript
const express = require('express');
|
|
const router = express.Router();
|
|
const upload = require('../middleware/multer');
|
|
|
|
const {
|
|
createBookmark,
|
|
getAllBookmarks,
|
|
getSingleBookmark,
|
|
updateBookmark,
|
|
deleteBookmark,
|
|
} = require('../controllers/bookmarks');
|
|
|
|
router.route('/').post(upload, createBookmark).get(getAllBookmarks);
|
|
|
|
router
|
|
.route('/:id')
|
|
.get(getSingleBookmark)
|
|
.put(upload, updateBookmark)
|
|
.delete(deleteBookmark);
|
|
|
|
module.exports = router;
|