mirror of
https://github.com/pawelmalak/flame.git
synced 2025-08-03 01:45:17 +02:00
Bookmarks controller
This commit is contained in:
parent
100f274d96
commit
27250dc850
7 changed files with 118 additions and 7 deletions
23
routes/bookmark.js
Normal file
23
routes/bookmark.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
const express = require('express');
|
||||
const router = express.Router();
|
||||
|
||||
const {
|
||||
createBookmark,
|
||||
getBookmarks,
|
||||
getBookmark,
|
||||
updateBookmark,
|
||||
deleteBookmark
|
||||
} = require('../controllers/bookmark');
|
||||
|
||||
router
|
||||
.route('/')
|
||||
.post(createBookmark)
|
||||
.get(getBookmarks);
|
||||
|
||||
router
|
||||
.route('/:id')
|
||||
.get(getBookmark)
|
||||
.put(updateBookmark)
|
||||
.delete(deleteBookmark);
|
||||
|
||||
module.exports = router;
|
Loading…
Add table
Add a link
Reference in a new issue