Remove unecessary check
This commit is contained in:
parent
ce1ce11877
commit
d77f1a96b2
|
@ -3,14 +3,12 @@ import prisma from '../../prisma'
|
|||
const MAX_RESULT = 5000
|
||||
|
||||
export async function logs(parent, { search, dateIn, dateOut, limit }) {
|
||||
if (!dateOut) dateOut = new Date()
|
||||
|
||||
try {
|
||||
const logs = await prisma.log.findMany({
|
||||
where: {
|
||||
timestamp: {
|
||||
gte: dateIn ? new Date(dateIn) : undefined,
|
||||
lte: new Date(dateOut)
|
||||
lte: dateOut ? new Date(dateOut) : undefined
|
||||
}
|
||||
},
|
||||
orderBy: { timestamp: 'desc' },
|
||||
|
|
Loading…
Reference in New Issue
Block a user