Update based on portbase review suggestions
This commit is contained in:
12
core/api.go
12
core/api.go
@@ -9,17 +9,17 @@ import (
|
||||
|
||||
func registerActions() error {
|
||||
if err := api.RegisterEndpoint(api.Endpoint{
|
||||
Path: "core/shutdown",
|
||||
Read: api.PermitSelf,
|
||||
ActionFn: shutdown,
|
||||
Path: "core/shutdown",
|
||||
Read: api.PermitSelf,
|
||||
ActionFunc: shutdown,
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := api.RegisterEndpoint(api.Endpoint{
|
||||
Path: "core/restart",
|
||||
Read: api.PermitSelf,
|
||||
ActionFn: restart,
|
||||
Path: "core/restart",
|
||||
Read: api.PermitSelf,
|
||||
ActionFunc: restart,
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user