This commit is contained in:
David Schroeder
2026-07-25 15:18:21 -05:00
parent 6594aece09
commit 1dcfc56844
11 changed files with 369 additions and 164 deletions
+3
View File
@@ -104,6 +104,7 @@ type pageData struct {
Error string
Notice string
GiteaLoginURL string
CurrentView string
}
func New(cfg Config) (*Server, error) {
@@ -182,6 +183,8 @@ func (s *Server) Routes() http.Handler {
mux.HandleFunc("GET /auth/callback", s.handleCallback)
mux.HandleFunc("POST /auth/logout", s.handleLogout)
mux.HandleFunc("GET /portal", s.requireTechnician(s.handlePortal))
mux.HandleFunc("GET /portal/packages", s.requireTechnician(s.handlePackagesPortal))
mux.HandleFunc("GET /portal/audit", s.requireTechnician(s.handleAuditPortal))
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))