diff --git a/src/server/trpc/routers/monitor.ts b/src/server/trpc/routers/monitor.ts index fbc311e..d976bbc 100644 --- a/src/server/trpc/routers/monitor.ts +++ b/src/server/trpc/routers/monitor.ts @@ -355,11 +355,14 @@ export const monitorRouter = router({ ) .output(z.array(monitorEventSchema)) .query(async ({ input }) => { - const { monitorId } = input; + const { workspaceId, monitorId } = input; const list = await prisma.monitorEvent.findMany({ where: { monitorId, + monitor: { + workspaceId: workspaceId, + }, }, orderBy: { createdAt: 'desc',