Improve api listener integration

This commit is contained in:
Daniel 2019-10-04 23:49:13 +02:00
parent d840c85a63
commit adc359c15b
2 changed files with 21 additions and 3 deletions

View file

@ -7,13 +7,17 @@ import (
"github.com/safing/portbase/modules"
)
var (
module *modules.Module
)
// API Errors
var (
ErrAuthenticationAlreadySet = errors.New("the authentication function has already been set")
)
func init() {
modules.Register("api", prep, start, stop, "base", "database", "config")
module = modules.Register("api", prep, start, stop, "base", "database", "config")
}
func prep() error {