added new fields to permit model, removed changes endpoints

This commit is contained in:
2025-05-23 14:43:18 +05:30
parent 564bfc061e
commit b51e36ebad
4 changed files with 24 additions and 72 deletions

View File

@@ -1,7 +1,6 @@
import { FastifyInstance } from "fastify";
import {
deletePermitHandler,
getPermitChangesHandler,
getPermitHandler,
listPermitsHandler,
searchPermitHandler,
@@ -121,21 +120,6 @@ export async function permitRoutes(fastify: FastifyInstance) {
}
);
fastify.get(
"/:permitId/changes",
{
schema: {
params: {
type: "object",
properties: { permitId: { type: "string" } },
},
},
config: { requiredClaims: ["permit:read"] },
preHandler: [fastify.authorize],
},
getPermitChangesHandler
);
await noteRoutes(fastify);
fastify.addHook("onSend", hideFields("permits"));