Skip to content

Commit

Permalink
clean and clear
Browse files Browse the repository at this point in the history
  • Loading branch information
TuvalSimha committed Oct 15, 2024
1 parent 6f4df39 commit 405fe17
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export const typeDefs = gql`
date range and user id.
"""
input AuditLogFilter {
from: DateTime
to: DateTime
startDate: DateTime
endDate: DateTime
userId: ID
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ export class AuditLogManager {
if (props.filter?.userId) {
where.push(sql`user_id = ${props.filter.userId}`);
}
if (props.filter?.from && props.filter?.to) {
const from = formatToClickhouseDateTime(props.filter.from.toISOString());
const to = formatToClickhouseDateTime(props.filter.to.toISOString());
if (props.filter?.startDate && props.filter?.endDate) {
const from = formatToClickhouseDateTime(props.filter.startDate.toISOString());
const to = formatToClickhouseDateTime(props.filter.endDate.toISOString());
where.push(sql`event_time >= ${from} AND event_time <= ${to}`);
}
}
Expand Down

0 comments on commit 405fe17

Please sign in to comment.