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))
|
.output(z.array(monitorEventSchema))
|
||||||
.query(async ({ input }) => {
|
.query(async ({ input }) => {
|
||||||
const { monitorId } = input;
|
const { workspaceId, monitorId } = input;
|
||||||
|
|
||||||
const list = await prisma.monitorEvent.findMany({
|
const list = await prisma.monitorEvent.findMany({
|
||||||
where: {
|
where: {
|
||||||
monitorId,
|
monitorId,
|
||||||
|
monitor: {
|
||||||
|
workspaceId: workspaceId,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
orderBy: {
|
orderBy: {
|
||||||
createdAt: 'desc',
|
createdAt: 'desc',
|
||||||
|
Loading…
Reference in New Issue
Block a user