add get notification route
This commit is contained in:
@@ -3,6 +3,7 @@ import { $notification } from "./notification.schema";
|
||||
import {
|
||||
createNotificationHandler,
|
||||
deleteNotificationHandler,
|
||||
getNotificationHandler,
|
||||
listNotificationsHandler,
|
||||
updateNotificationHandler,
|
||||
} from "./notification.controller";
|
||||
@@ -22,6 +23,18 @@ export async function notificationRoutes(fastify: FastifyInstance) {
|
||||
createNotificationHandler
|
||||
);
|
||||
|
||||
fastify.get(
|
||||
"/:notifId",
|
||||
{
|
||||
schema: {
|
||||
params: { type: "object", properties: { notifId: { type: "string" } } },
|
||||
},
|
||||
config: { requiredClaims: ["notification:read"] },
|
||||
preHandler: [fastify.authorize],
|
||||
},
|
||||
getNotificationHandler
|
||||
);
|
||||
|
||||
fastify.get(
|
||||
"/",
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user