update project
This commit is contained in:
@@ -9,11 +9,7 @@ module.exports = function (sequelize) {
|
||||
router.delete("/:projectId", async (req, res) => {
|
||||
const projectId = req.params.projectId;
|
||||
try {
|
||||
const project = await Project.findOne({
|
||||
where: {
|
||||
id: projectId,
|
||||
},
|
||||
});
|
||||
const project = await Project.findByPk(projectId);
|
||||
if (!project) {
|
||||
return res.status(404).send("Project not found");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user