mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-27 14:59:37 +02:00
19 lines
440 B
JavaScript
19 lines
440 B
JavaScript
|
const asyncWrapper = require('../../middleware/asyncWrapper');
|
||
|
const Bookmark = require('../../models/Bookmark');
|
||
|
|
||
|
// @desc Delete bookmark
|
||
|
// @route DELETE /api/bookmarks/:id
|
||
|
// @access Public
|
||
|
const deleteBookmark = asyncWrapper(async (req, res, next) => {
|
||
|
await Bookmark.destroy({
|
||
|
where: { id: req.params.id },
|
||
|
});
|
||
|
|
||
|
res.status(200).json({
|
||
|
success: true,
|
||
|
data: {},
|
||
|
});
|
||
|
});
|
||
|
|
||
|
module.exports = deleteBookmark;
|