fix: fix no workspace problem when fetch all monitor events
This commit is contained in:
parent
a20cd8dff9
commit
b050a56d4a
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user