Skip to content

Commit

Permalink
fix: handle if the query is empty
Browse files Browse the repository at this point in the history
Signed-off-by: Avior <[email protected]>
  • Loading branch information
Aviortheking committed Jan 3, 2024
1 parent c7c04da commit 479de85
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/src/V2/endpoints/jsonEndpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ server

// handle Query builder
.use((req, _, next) => {
// handle no query
if (!req.query) {
next()
return
}

const items: Query = {
filters: undefined,
sort: undefined,
Expand Down

0 comments on commit 479de85

Please sign in to comment.