Skip to content

Commit 8dd4808

Browse files
author
Claude
committed
admin: also register issue-desktop on RegisterOnMux
The Stockyard binary deploys two HTTP server entrypoints in one process: standalone apiserver via s.mux (used by tests + isolated runs) and the unified-binary mount via RegisterOnMux (used in production where billing/api share a port with the marketing site and the 6 flagship apps). The first commit of this endpoint (09298d1) only registered the new route in s.mux. Production Railway deploy serves via RegisterOnMux, so the route 404'd in production while passing in local-mux probes. Symptom that surfaced this: POST /api/admin/issue-desktop with no auth returned the proper 401 (s.mux somehow served), but with auth header it 404'd with the marketing site's not-found page — that 401 was actually from a different code path; the 404 came from RegisterOnMux not knowing the route. Subtle. Fix: register on the RegisterOnMux block too, matching what the existing /api/admin/issue does (it has identical dual registration).
1 parent 4197d46 commit 8dd4808

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

internal/apiserver/server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ func (s *Server) RegisterOnMux(mux *http.ServeMux) {
307307
mux.HandleFunc("GET /api/admin/stats", s.adminAuth(s.handleAdminStats))
308308
mux.HandleFunc("GET /api/admin/licenses", s.adminAuth(s.handleAdminLicenses))
309309
mux.HandleFunc("POST /api/admin/issue", s.adminAuth(s.handleAdminIssue))
310+
mux.HandleFunc("POST /api/admin/issue-desktop", s.adminAuth(s.handleAdminIssueDesktop))
310311
mux.HandleFunc("POST /api/admin/revoke", s.adminAuth(s.handleAdminRevoke))
311312
mux.HandleFunc("POST /api/admin/backup", s.adminAuth(s.handleAdminBackup))
312313
mux.HandleFunc("GET /api/admin/trial-drip/suspects", s.adminAuth(s.handleAdminTrialDripSuspects))

0 commit comments

Comments
 (0)