feat: check for client match on GET endpoint of permits and processed

This commit is contained in:
2025-11-08 10:22:41 +05:30
parent 0fa88bea70
commit 894343db5a
4 changed files with 21 additions and 8 deletions

View File

@@ -29,7 +29,7 @@ export async function getPermitHandler(req: FastifyRequest, res: FastifyReply) {
const { permitId } = req.params as { permitId: string };
try {
const permit = await getPermit(permitId, req.user.tenantId);
const permit = await getPermit(permitId, req.user);
if (permit === null)
return res.code(404).send({ error: "resource not found" });