update permits schema

This commit is contained in:
2025-02-05 09:57:08 +05:30
parent 9f337655a0
commit 8559aab3da
4 changed files with 160 additions and 14 deletions

View File

@@ -18,7 +18,7 @@ export async function createPermitHandler(
const input = req.body as CreatePermitInput;
try {
const permit = await createPermit(input, req.user.tenantId);
const permit = await createPermit(input, req.user);
return res.code(201).send(permit);
} catch (err) {
return err;
@@ -62,11 +62,7 @@ export async function updatePermitHandler(
const { permitId } = req.params as { permitId: string };
try {
const updatedPermit = await updatePermit(
input,
permitId,
req.user.tenantId
);
const updatedPermit = await updatePermit(input, permitId, req.user);
if (!updatedPermit)
return res.code(404).send({ error: "resource not found" });