Improve endpoint metadata

This commit is contained in:
Daniel 2021-11-23 12:56:30 +01:00
parent 462570f0c9
commit 8c758e7e52
2 changed files with 4 additions and 5 deletions

View file

@ -24,9 +24,9 @@ import (
type Endpoint struct {
Path string
MimeType string
Read Permission
Write Permission
BelongsTo *modules.Module
Read Permission `json:",omitempty"`
Write Permission `json:",omitempty"`
BelongsTo *modules.Module `json:"-"`
// ActionFunc is for simple actions with a return message for the user.
ActionFunc ActionFunc `json:"-"`
@ -48,7 +48,7 @@ type Endpoint struct {
Name string
Description string
Parameters []Parameter
Parameters []Parameter `json:",omitempty"`
}
// Parameter describes a parameterized variation of an endpoint.

View file

@ -51,7 +51,6 @@ func registerMetaEndpoints() error {
if err := RegisterEndpoint(Endpoint{
Path: "auth/reset",
Read: PermitAnyone,
Write: PermitAnyone,
HandlerFunc: authReset,
Name: "Reset Authenticated Session",
Description: "Resets authentication status internally and in the browser.",