Skip to content

Commit

Permalink
Simplify collection middleware conditionals
Browse files Browse the repository at this point in the history
Signed-off-by: Olga Bulat <[email protected]>
  • Loading branch information
obulat committed Mar 6, 2024
1 parent 1676051 commit 36a0bd9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions frontend/src/middleware/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,17 @@ const queryToCollectionParams = (
collection: "tag",
tag: query.tag,
} as TagCollection
} else if ("creator" in query && "source" in query) {
}

if ("creator" in query && "source" in query) {
return {
collection: "creator",
creator: query.creator,
source: query.source,
} as CreatorCollection
} else if ("source" in query) {
}

if ("source" in query) {
return {
collection: "source",
source: query.source,
Expand Down

0 comments on commit 36a0bd9

Please sign in to comment.