Merged in feature/add-deletes (pull request #214)
support delete for client, document and folder * support delete for client, document and folder * remove batch cancel conflict not used Approved-by: Jacob Mathison
This commit is contained in:
@@ -288,19 +288,3 @@ func (s *Controllers) GetDocumentBatch(ctx echo.Context, clientId ClientID, batc
|
||||
|
||||
return ctx.JSON(http.StatusOK, details)
|
||||
}
|
||||
|
||||
// CancelDocumentBatch cancels a batch upload in progress
|
||||
func (s *Controllers) CancelDocumentBatch(ctx echo.Context, clientId ClientID, batchId BatchID) error {
|
||||
// BatchID is already a UUID type
|
||||
batchUUID := uuid.UUID(batchId)
|
||||
|
||||
// Cancel the batch
|
||||
err := s.svc.DocumentBatch.Cancel(ctx.Request().Context(), clientId, batchUUID)
|
||||
if err != nil {
|
||||
slog.Error("unable to cancel batch", "error", err, "batchId", batchId)
|
||||
return echo.NewHTTPError(http.StatusNotFound, "batch not found or cannot be canceled")
|
||||
}
|
||||
|
||||
// Return 204 No Content for successful cancellation
|
||||
return ctx.NoContent(http.StatusNoContent)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user