Include limit-capped flag with search response

The server defines a `limit` value and search requests are capped to
this limit if their requested value exceeds it. If this happens it is
now returned with the search response (clients can print a warning).

Closes: #1358
This commit is contained in:
eikek
2022-05-26 22:24:56 +02:00
parent f8baf44c09
commit 50edf13f94
5 changed files with 106 additions and 35 deletions

View File

@ -64,10 +64,10 @@ concat l0 l1 =
suff =
List.drop 1 l1.groups
in
ItemLightList (prev ++ (ng :: suff))
ItemLightList (prev ++ (ng :: suff)) 0 0 False
else
ItemLightList (l0.groups ++ l1.groups)
ItemLightList (l0.groups ++ l1.groups) 0 0 False
first : ItemLightList -> Maybe ItemLight
@ -121,7 +121,7 @@ replaceIn origin replacements =
|> ItemLightGroup g.name
in
List.map replaceGroup origin.groups
|> ItemLightList
|> (\els -> ItemLightList els origin.limit origin.offset origin.limitCapped)