Merged in feature/textExtractionsPart2 (pull request #193)

Continue finishing the parts of the text extraction plan

* add missing fields
This commit is contained in:
Jay Brown
2025-12-02 19:13:08 +00:00
parent c45e1dd427
commit 3bdc27f4de
21 changed files with 2392 additions and 215 deletions
+24
View File
@@ -58,3 +58,27 @@ func (s *Controllers) UpdateClient(ctx echo.Context, id ClientID) error {
return ctx.NoContent(http.StatusOK)
}
// ListClients returns all clients in the system.
func (s *Controllers) ListClients(ctx echo.Context) error {
clients, err := s.svc.Client.List(ctx.Request().Context())
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Unable to list clients: %s", err))
}
// Convert to API response format
apiClients := make([]DocClient, len(clients))
for i, c := range clients {
apiClients[i] = DocClient{
Id: c.ID,
Name: c.Name,
CanSync: c.CanSync,
}
}
return ctx.JSON(http.StatusOK, ClientListResponse{
Clients: apiClients,
//nolint:gosec // Client count is bounded by maxItems: 10000 in OpenAPI spec
TotalCount: int32(len(apiClients)),
})
}