diff --git a/api/endpoints.go b/api/endpoints.go index 2742f78..4d8de25 100644 --- a/api/endpoints.go +++ b/api/endpoints.go @@ -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. diff --git a/api/endpoints_meta.go b/api/endpoints_meta.go index 9077307..0cf4189 100644 --- a/api/endpoints_meta.go +++ b/api/endpoints_meta.go @@ -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.",