mirror of
https://github.com/pawelmalak/flame.git
synced 2025-01-02 07:27:03 +03:00
23 lines
390 B
JavaScript
23 lines
390 B
JavaScript
|
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;
|