RC-8
release-tag / release-image (push) Successful in 4m39s

This commit is contained in:
2026-08-11 19:02:09 +02:00
parent d9eb570629
commit ba3818ef30
8 changed files with 171 additions and 32 deletions
+15
View File
@@ -310,6 +310,7 @@ func (s *Server) Routes() http.Handler {
r.Post("/api/internal/delegations", s.internalDelegation)
r.Post("/api/internal/identity-exists", s.internalIdentityExists)
r.Post("/api/internal/customer-link/consume", s.internalCustomerLinkConsume)
r.Get("/api/internal/customer-service/health", s.internalCustomerServiceHealth)
r.Group(func(r chi.Router) {
r.Use(func(n http.Handler) http.Handler { return s.require("user", n) })
r.Get("/api/tasks", s.clientTasks)
@@ -903,6 +904,20 @@ func (s *Server) customerLinkCode(w http.ResponseWriter, r *http.Request) {
jsonOut(w, 201, map[string]any{"code": code, "client_id": c.ClientID, "expires_at": expires})
}
func (s *Server) internalCustomerServiceHealth(w http.ResponseWriter, r *http.Request) {
secret := strings.TrimSpace(s.internalServiceSecret)
if !serviceTokenOK(secret, r.Header.Get("Authorization")) {
jsonOut(w, http.StatusUnauthorized, map[string]string{"error": "unauthorized"})
return
}
w.Header().Set("Cache-Control", "no-store")
jsonOut(w, http.StatusOK, map[string]any{
"ok": true,
"service": "neuralhunt-game-control-plane",
"customer_link_supported": true,
})
}
func (s *Server) internalCustomerLinkConsume(w http.ResponseWriter, r *http.Request) {
secret := strings.TrimSpace(s.internalServiceSecret)
if !serviceTokenOK(secret, r.Header.Get("Authorization")) {