mirror of
https://github.com/pawelmalak/flame.git
synced 2024-12-19 08:02:16 +03:00
24 lines
454 B
JavaScript
24 lines
454 B
JavaScript
const express = require('express');
|
|
const router = express.Router();
|
|
const upload = require('../middleware/multer');
|
|
|
|
const {
|
|
createBookmark,
|
|
getBookmarks,
|
|
getBookmark,
|
|
updateBookmark,
|
|
deleteBookmark
|
|
} = require('../controllers/bookmark');
|
|
|
|
router
|
|
.route('/')
|
|
.post(upload, createBookmark)
|
|
.get(getBookmarks);
|
|
|
|
router
|
|
.route('/:id')
|
|
.get(getBookmark)
|
|
.put(upload, updateBookmark)
|
|
.delete(deleteBookmark);
|
|
|
|
module.exports = router; |