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

View file

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