add notification create route, update permit update rotue
This commit is contained in:
@@ -1,11 +1,24 @@
|
||||
import { FastifyInstance } from "fastify";
|
||||
import { $notification } from "./notification.schema";
|
||||
import {
|
||||
createNotificationHandler,
|
||||
listNotificationsHandler,
|
||||
updateNotificationHandler,
|
||||
} from "./notification.controller";
|
||||
|
||||
export async function notificationRoutes(fastify: FastifyInstance) {
|
||||
fastify.post(
|
||||
"/",
|
||||
{
|
||||
schema: {
|
||||
body: $notification("createNotificationInput"),
|
||||
},
|
||||
config: { requiredClaims: ["notification:write"] },
|
||||
preHandler: [fastify.authorize],
|
||||
},
|
||||
createNotificationHandler
|
||||
);
|
||||
|
||||
fastify.get(
|
||||
"/",
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user