Download this file
| 1 | package main |
| 2 | |
| 3 | // The public integrations catalog (docs/integrations.md): the embedded, |
| 4 | // reviewed registry served verbatim — like GET /api/apps — so the web client |
| 5 | // can render the connect catalog and the exact consent lines the sidecar will |
| 6 | // enforce. Manifests are reviewed public data; there is nothing secret here. |
| 7 | |
| 8 | import ( |
| 9 | "encoding/json" |
| 10 | "net/http" |
| 11 | |
| 12 | "lchat/integrations" |
| 13 | ) |
| 14 | |
| 15 | func (s *Server) getIntegrations(w http.ResponseWriter, r *http.Request) { |
| 16 | w.Header().Set("Content-Type", "application/json") |
| 17 | json.NewEncoder(w).Encode(map[string]any{"schema": 1, "services": integrations.MustRegistry().List()}) |
| 18 | } |
| 19 | |