bug(delete) - fixed bug)

This commit is contained in:
2025-09-17 02:41:46 +05:30
parent bce2fe7b38
commit 042e170362
5 changed files with 37 additions and 34 deletions

View File

@@ -375,7 +375,10 @@ router.delete("/:id", async (req: Request, res: Response): Promise<any> => {
}
if (existingClaim.userId !== req.user!.id) {
return res.status(403).json({ message: "Forbidden" });
return res.status(403).json({
message:
"Forbidden: Claim belongs to a different user, you can't delete this.",
});
}
await storage.deleteClaim(claimId);