feat: Superadmin impersonation and env password override

This commit is contained in:
DmitrL-dev 2026-03-31 07:41:07 +10:00
parent f833602145
commit d0a02b1506
3 changed files with 155 additions and 10 deletions

View file

@ -379,6 +379,9 @@ func (s *Server) Start(ctx context.Context) error {
mux.HandleFunc("POST /api/auth/tenant/plan", auth.HandleUpdateTenantPlan(s.tenantStore))
mux.HandleFunc("GET /api/auth/billing", auth.HandleBillingStatus(s.tenantStore))
mux.HandleFunc("POST /api/billing/webhook", auth.HandleStripeWebhook(s.tenantStore))
// Superadmin endpoints
mux.HandleFunc("GET /api/auth/tenants", auth.HandleListTenants(s.tenantStore))
mux.HandleFunc("POST /api/auth/impersonate", auth.HandleImpersonateTenant(s.tenantStore, s.jwtSecret))
}
}