mirror of
https://github.com/pawelmalak/flame.git
synced 2025-08-04 10:25:17 +02:00
Changed config api. Split config controllers into separate files. Split bookmarks controllers into separate files
This commit is contained in:
parent
76e50624e7
commit
cfb471e578
23 changed files with 579 additions and 602 deletions
|
@ -4,21 +4,18 @@ const upload = require('../middleware/multer');
|
|||
|
||||
const {
|
||||
createBookmark,
|
||||
getBookmarks,
|
||||
getBookmark,
|
||||
getAllBookmarks,
|
||||
getSingleBookmark,
|
||||
updateBookmark,
|
||||
deleteBookmark
|
||||
} = require('../controllers/bookmark');
|
||||
deleteBookmark,
|
||||
} = require('../controllers/bookmarks');
|
||||
|
||||
router
|
||||
.route('/')
|
||||
.post(upload, createBookmark)
|
||||
.get(getBookmarks);
|
||||
router.route('/').post(upload, createBookmark).get(getAllBookmarks);
|
||||
|
||||
router
|
||||
.route('/:id')
|
||||
.get(getBookmark)
|
||||
.get(getSingleBookmark)
|
||||
.put(upload, updateBookmark)
|
||||
.delete(deleteBookmark);
|
||||
|
||||
module.exports = router;
|
||||
module.exports = router;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue