diff --git a/go.mod b/go.mod index c586abdbf..72a4a5cef 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ module code.vikunja.io/api require ( cloud.google.com/go v0.34.0 // indirect - code.vikunja.io/web v0.0.0-20191022193355-23a3d145177a + code.vikunja.io/web v0.0.0-20191022195605-8edfc5d33c79 github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a github.com/beevik/etree v1.1.0 // indirect diff --git a/go.sum b/go.sum index 77ccb8726..b2c714182 100644 --- a/go.sum +++ b/go.sum @@ -11,6 +11,8 @@ code.vikunja.io/web v0.0.0-20191021211916-f7834b02a174 h1:hBY+r6bzGEfHxolaXbiVoz code.vikunja.io/web v0.0.0-20191021211916-f7834b02a174/go.mod h1:cuP1/ieGWAZzgQGw+QPt6Y5F0fVb/8Ol5NV4QSezGdo= code.vikunja.io/web v0.0.0-20191022193355-23a3d145177a h1:exDC9eZ+SK0GT3zB/5f3OBahWzbTZlvX9OfZWgqlbeI= code.vikunja.io/web v0.0.0-20191022193355-23a3d145177a/go.mod h1:cuP1/ieGWAZzgQGw+QPt6Y5F0fVb/8Ol5NV4QSezGdo= +code.vikunja.io/web v0.0.0-20191022195605-8edfc5d33c79 h1:U2px27G/b082nUu8vO21wFNKF9BM+5YQJj4XRZiyn2I= +code.vikunja.io/web v0.0.0-20191022195605-8edfc5d33c79/go.mod h1:cuP1/ieGWAZzgQGw+QPt6Y5F0fVb/8Ol5NV4QSezGdo= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= diff --git a/pkg/routes/routes.go b/pkg/routes/routes.go index fa426ac33..7bc0ce074 100644 --- a/pkg/routes/routes.go +++ b/pkg/routes/routes.go @@ -110,6 +110,7 @@ func NewEcho() *echo.Echo { AuthObject: apiv1.GetAuthFromClaims, }) handler.SetLoggingProvider(log.GetLogger()) + handler.SetMaxItemsPerPage(config.ServicePageCount.GetInt()) return e } diff --git a/vendor/code.vikunja.io/web/handler/config.go b/vendor/code.vikunja.io/web/handler/config.go index ef2185ee0..b961138a3 100644 --- a/vendor/code.vikunja.io/web/handler/config.go +++ b/vendor/code.vikunja.io/web/handler/config.go @@ -43,3 +43,8 @@ func SetAuthProvider(provider *web.Auths) { func SetLoggingProvider(logger *logging.Logger) { config.LoggingProvider = logger } + +// SetMaxItemsPerPage sets the max number of items per page in the config +func SetMaxItemsPerPage(maxItemsPerPage int) { + config.MaxItemsPerPage = maxItemsPerPage +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 1b4160429..8498a6037 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,4 +1,4 @@ -# code.vikunja.io/web v0.0.0-20191022193355-23a3d145177a +# code.vikunja.io/web v0.0.0-20191022195605-8edfc5d33c79 code.vikunja.io/web code.vikunja.io/web/handler # github.com/BurntSushi/toml v0.3.1