Improve pagination (#105)
This commit is contained in:
9
vendor/code.vikunja.io/web/handler/config.go
generated
vendored
9
vendor/code.vikunja.io/web/handler/config.go
generated
vendored
@ -21,9 +21,11 @@ import (
|
||||
"github.com/op/go-logging"
|
||||
)
|
||||
|
||||
// Config contains the config for the web handler
|
||||
type Config struct {
|
||||
AuthProvider *web.Auths
|
||||
LoggingProvider *logging.Logger
|
||||
MaxItemsPerPage int
|
||||
}
|
||||
|
||||
var config *Config
|
||||
@ -32,10 +34,17 @@ func init() {
|
||||
config = &Config{}
|
||||
}
|
||||
|
||||
// SetAuthProvider sets the auth provider in config
|
||||
func SetAuthProvider(provider *web.Auths) {
|
||||
config.AuthProvider = provider
|
||||
}
|
||||
|
||||
// SetLoggingProvider sets the logging provider in the config
|
||||
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
|
||||
}
|
||||
|
Reference in New Issue
Block a user