added page deletion
This commit is contained in:
@@ -58,5 +58,18 @@ exports.updatePageContent = async (req, res) => {
|
||||
}
|
||||
})
|
||||
|
||||
res.status(200).json("ok");
|
||||
}
|
||||
|
||||
exports.deletePage = async (req, res) => {
|
||||
const pageId = req.params.id;
|
||||
|
||||
await page.destroy(
|
||||
{
|
||||
where: {
|
||||
pageId: pageId
|
||||
}
|
||||
});
|
||||
|
||||
res.status(200).json("ok");
|
||||
}
|
||||
Reference in New Issue
Block a user