Link api endpoints and http handlers to their modules

This commit is contained in:
Daniel
2021-05-17 14:43:17 +02:00
parent 3d5807e3a9
commit 78c56861ab
7 changed files with 28 additions and 12 deletions

View File

@@ -10,8 +10,9 @@ const (
func registerAPIEndpoints() error {
return api.RegisterEndpoint(api.Endpoint{
Path: apiPathCheckForUpdates,
Write: api.PermitUser,
Path: apiPathCheckForUpdates,
Write: api.PermitUser,
BelongsTo: module,
ActionFunc: func(_ *api.Request) (msg string, err error) {
if err := TriggerUpdate(); err != nil {
return "", err