add /search endpoints

This commit is contained in:
2025-04-26 09:55:47 +05:30
parent e93c2cde96
commit cf569edfe6
5 changed files with 86 additions and 2 deletions

View File

@@ -57,13 +57,25 @@ export async function notificationRoutes(fastify: FastifyInstance) {
},
},
},
config: { requiredClaims: ["notification:delete"] },
preHandler: [fastify.authorize],
},
deleteNotificationHandler
);
fastify.get(
"/search",
{
schema: {
querystring: $notification("pageQueryParams"),
},
config: { requiredClaims: ["notification:delete"] },
preHandler: [fastify.authorize],
},
listNotificationsHandler
);
fastify.get(
"/fields/:field",
{