Skip to content

Commit

Permalink
Include limit in search context
Browse files Browse the repository at this point in the history
Closes #793
  • Loading branch information
jisantuc committed Aug 30, 2021
1 parent 43dd44f commit 3ed46f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ class SearchService[F[_]: Concurrent](
}
((items, links), count) <- (itemsFib, countFib).tupled.join
} yield {
val withApiHost = items map { _.updateLinksWithHost(apiConfig) }
val searchResult = StacSearchCollection(Context(items.length, count), withApiHost, links)
val withApiHost = items map { _.updateLinksWithHost(apiConfig) }
val searchResult =
StacSearchCollection(Context(limit, items.length, count), withApiHost, links)
val updatedFeatures = searchResult.features
.map { item =>
((item.collection, enableTiles) match {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ object Context {
}

case class Context(
limit: Int,
returned: Int,
matched: Int
)

0 comments on commit 3ed46f7

Please sign in to comment.