mirror of
https://github.com/safing/portbase
synced 2025-09-02 02:29:59 +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 {
|
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.
|
||||||
|
|
|
@ -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.",
|
||||||
|
|
Loading…
Add table
Reference in a new issue