Return item notes with search results

In order to not make the response very large, a admin can define a
limit on how much to return.
This commit is contained in:
Eike Kettner
2020-08-04 22:45:35 +02:00
parent f1e776ae3d
commit 09d74b7e80
11 changed files with 75 additions and 25 deletions

View File

@ -14,6 +14,7 @@ let
app-id = "rest1";
base-url = "http://localhost:7880";
max-item-page-size = 200;
max-note-length = 180;
bind = {
address = "localhost";
port = 7880;
@ -124,6 +125,17 @@ in {
'';
};
max-note-length = mkOption {
type = types.int;
default = defaults.max-note-length;
description = ''
The number of characters to return for each item notes when
searching. Item notes may be very long, when returning them with
all the results from a search, they add quite some data to return.
In order to keep this low, a limit can be defined here.
'';
};
bind = mkOption {
type = types.submodule({
options = {