This commit is contained in:
2023-12-13 16:14:26 +05:00
parent 3842ec4327
commit 4509450bad
3 changed files with 0 additions and 6 deletions
-6
View File
@@ -40,16 +40,12 @@ router.post("/", async (req, res) => {
});
router.put("/:id", async (req, res) => {
console.log(req.body);
try {
const project = await Project.findByIdAndUpdate(req.params.id, req.body, {
upsert: true,
new: true,
});
console.log("updated", project);
return res.json(project);
} catch (error) {
if (error instanceof Error) {
@@ -59,8 +55,6 @@ router.put("/:id", async (req, res) => {
});
router.delete("/:id", async (req, res) => {
console.log(req.body);
try {
const project = await Project.findByIdAndDelete(req.params.id);
Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB