ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/missionmatch / internal/modules/commandcenter/handler.go

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/missionmatch / internal/modules/commandcenter/handler.go
DateNot specified in source
RepositoryJanady13/missionmatch
Revision39df94f92b2a33f852481fe1954dabed841524bb
Branchw0-aedt-compliance
Path or archive memberinternal/modules/commandcenter/handler.go
Original SHA-2560075e210b29c82bdc911b3856c80a42af630a4e8af2c09e0070e43a3bf6111cb
Git blob SHA878eba6a9f85be5a8b83a7fce05d39d8560fc214
Reading-copy SHA-2560075e210b29c82bdc911b3856c80a42af630a4e8af2c09e0070e43a3bf6111cb

Original source ↗

Recovered source transcript

package commandcenter import ( "encoding/json" "errors" "net/http" "time" "github.com/go-chi/chi/v5" "github.com/missionworkforce/missionmatch/internal/platform/tenant" ) // Handler serves the Workforce Command Center endpoint. type Handler struct{ svc *Service } func NewHandler(svc *Service) *Handler { return &Handler{svc: svc} } // Routes mounts GET /command-center under the tenant-scoped group. func (h *Handler) Routes(r chi.Router) { r.Get("/command-center", h.get) } func (h *Handler) get(w http.ResponseWriter, r *http.Request) { asOf := h.svc.clock() if q := r.URL.Query().Get("as_of"); q != "" { if t, err := time.Parse("2006-01-02", q); err == nil { asOf = t } } v, err := h.svc.CommandCenter(r.Context(), asOf) if err != nil { w.Header().Set("Content-Type", "application/json") switch { case errors.Is(err, tenant.ErrNoTenant): w.WriteHeader(http.StatusForbidden) _, _ = w.Write([]byte(`{"error":"no validated tenant"}`)) case errors.Is(err, ErrNoDatabase): w.WriteHeader(http.StatusServiceUnavailable) _, _ = w.Write([]byte(`{"error":"database not configured"}`)) default: w.WriteHeader(http.StatusInternalServerError) _, _ = w.Write([]byte(`{"error":"internal error"}`)) } return } w.Header().Set("Content-Type", "application/json") _ = json.NewEncoder(w).Encode(v) }

Search equations, builds, manuscript text, and recovered sources.