update
This commit is contained in:
@@ -48,6 +48,12 @@ type packageRecord struct {
|
||||
Enabled bool
|
||||
}
|
||||
|
||||
type actionRecord struct {
|
||||
Slug string
|
||||
DisplayName string
|
||||
Enabled bool
|
||||
}
|
||||
|
||||
type authorizationRecord struct {
|
||||
ID uint64
|
||||
CodeHint string
|
||||
@@ -59,6 +65,7 @@ type authorizationRecord struct {
|
||||
ExpiresAt time.Time
|
||||
RevokedAt sql.NullTime
|
||||
Packages string
|
||||
Actions string
|
||||
}
|
||||
|
||||
type auditRecord struct {
|
||||
@@ -78,6 +85,7 @@ type pageData struct {
|
||||
Authorizations []authorizationRecord
|
||||
AuditEvents []auditRecord
|
||||
Packages []packageRecord
|
||||
Actions []actionRecord
|
||||
NewCode string
|
||||
DefaultHostLimit int
|
||||
DefaultDuration string
|
||||
@@ -161,6 +169,7 @@ func (s *Server) Routes() http.Handler {
|
||||
mux.HandleFunc("POST /portal/authorizations", s.requireTechnician(s.handleCreateAuthorization))
|
||||
mux.HandleFunc("POST /portal/authorizations/{id}/revoke", s.requireTechnician(s.handleRevokeAuthorization))
|
||||
mux.HandleFunc("POST /portal/packages", s.requireTechnician(s.handleUpsertPackage))
|
||||
mux.HandleFunc("POST /portal/packages/upload", s.requireTechnician(s.handleUploadPackage))
|
||||
mux.HandleFunc("POST /api/v1/exchange", s.handleExchange)
|
||||
mux.HandleFunc("GET /api/v1/packages/{slug}", s.handlePackageDownload)
|
||||
mux.HandleFunc("GET /", s.handleHome)
|
||||
|
||||
Reference in New Issue
Block a user