1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-19 11:39:36 +02:00
flame/routes/bookmark.js

22 lines
466 B
JavaScript
Raw Normal View History

2021-05-23 17:18:04 +02:00
const express = require('express');
const router = express.Router();
2021-07-28 12:36:03 +02:00
const upload = require('../middleware/multer');
2021-05-23 17:18:04 +02:00
const {
createBookmark,
getAllBookmarks,
getSingleBookmark,
2021-05-23 17:18:04 +02:00
updateBookmark,
deleteBookmark,
} = require('../controllers/bookmarks');
2021-05-23 17:18:04 +02:00
router.route('/').post(upload, createBookmark).get(getAllBookmarks);
2021-05-23 17:18:04 +02:00
router
.route('/:id')
.get(getSingleBookmark)
2021-07-28 12:36:03 +02:00
.put(upload, updateBookmark)
2021-05-23 17:18:04 +02:00
.delete(deleteBookmark);
module.exports = router;