mirror of
https://github.com/safing/portbase
synced 2025-09-01 18:19:57 +00:00
Improve endpoint metadata
This commit is contained in:
parent
462570f0c9
commit
8c758e7e52
2 changed files with 4 additions and 5 deletions
|
@ -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.
|
||||
|
|
|
@ -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.",
|
||||
|
|
Loading…
Add table
Reference in a new issue