Skip to content

Commit

Permalink
fix: fix no workspace problem when fetch all monitor events
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed Nov 9, 2023
1 parent a20cd8d commit b050a56
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/server/trpc/routers/monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit b050a56

Please sign in to comment.