Merged in feature/remove-mocks (pull request #202)
Feature/remove mocks * remove mocks * cleanup db migrations
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
// Package queryapi provides HTTP handlers for the Query API.
|
||||
// Note: Text extraction has been removed. MinimumTextVersion is no longer supported.
|
||||
// See remove_texttract_and_mocks_plan.md for details.
|
||||
package queryapi
|
||||
|
||||
import (
|
||||
@@ -10,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
// GetCollectorByClientId retrieves a client's collector configuration.
|
||||
// Query fields have been removed - only document processing settings remain.
|
||||
// Note: MinTextVersion has been removed since text extraction is deprecated.
|
||||
func (s *Controllers) GetCollectorByClientId(ctx echo.Context, clientId ClientID) error {
|
||||
coll, err := s.svc.Collector.GetByClientID(ctx.Request().Context(), clientId)
|
||||
if err != nil {
|
||||
@@ -20,14 +23,13 @@ func (s *Controllers) GetCollectorByClientId(ctx echo.Context, clientId ClientID
|
||||
return ctx.JSON(http.StatusOK, Collector{
|
||||
ClientId: clientId,
|
||||
MinimumCleanerVersion: coll.MinCleanVersion,
|
||||
MinimumTextVersion: coll.MinTextVersion,
|
||||
ActiveVersion: coll.ActiveVersion,
|
||||
LatestVersion: coll.LatestVersion,
|
||||
})
|
||||
}
|
||||
|
||||
// SetCollectorByClientId updates a client's collector configuration.
|
||||
// Query fields have been removed - only document processing settings remain.
|
||||
// Note: MinTextVersion has been removed since text extraction is deprecated.
|
||||
func (s *Controllers) SetCollectorByClientId(ctx echo.Context, clientId ClientID) error {
|
||||
req := CollectorSet{}
|
||||
if err := ctx.Bind(&req); err != nil {
|
||||
@@ -37,7 +39,6 @@ func (s *Controllers) SetCollectorByClientId(ctx echo.Context, clientId ClientID
|
||||
err := s.svc.CollectorSet.SetByClientId(ctx.Request().Context(), clientId, &collectorset.SetParams{
|
||||
ActiveVersion: req.ActiveVersion,
|
||||
MinCleanVersion: req.MinimumCleanerVersion,
|
||||
MinTextVersion: req.MinimumTextVersion,
|
||||
})
|
||||
if err != nil {
|
||||
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Unable to update collector: %s", err))
|
||||
|
||||
Reference in New Issue
Block a user