Openstatus www.openstatus.dev

chore: include provider in notification event (#1323)

authored by

Maximilian Kaske and committed by
GitHub
616be6c0 2cf1170a

+3 -3
+1 -1
apps/server/src/routes/v1/notifications/post.ts
··· 19 19 tags: ["notification"], 20 20 summary: "Create a notification", 21 21 path: "/", 22 - middleware: [trackMiddleware(Events.CreateNotification)], 22 + middleware: [trackMiddleware(Events.CreateNotification, ["provider"])], 23 23 request: { 24 24 body: { 25 25 description: "The notification to create",
+2 -2
packages/api/src/router/notification.ts
··· 19 19 20 20 export const notificationRouter = createTRPCRouter({ 21 21 create: protectedProcedure 22 - .meta({ track: Events.CreateNotification }) 22 + .meta({ track: Events.CreateNotification, trackProps: ["provider"] }) 23 23 .input(insertNotificationSchema) 24 24 .mutation(async (opts) => { 25 25 const { monitors, ...props } = opts.input; ··· 327 327 }), 328 328 329 329 new: protectedProcedure 330 - .meta({ track: Events.CreateNotification }) 330 + .meta({ track: Events.CreateNotification, trackProps: ["provider"] }) 331 331 .input( 332 332 z.object({ 333 333 provider: z.enum(notificationProvider),