Skip to content

Commit

Permalink
fix: remove legacy routes (#1424)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 authored Oct 3, 2024
1 parent 49df155 commit c53617d
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions robotoff/app/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,18 +750,6 @@ def on_get(self, req: falcon.Request, resp: falcon.Response):
}


class ImageImporterResource:
"""DEPRECATED
Robotoff used to be notified of new image from Product Opener using
webhooks, it now relies on Redis stream using the update-listener service.
"""

def on_post(self, req: falcon.Request, resp: falcon.Response):
resp.media = {
"status": "scheduled",
}


class ImageCropResource:
def on_get(self, req: falcon.Request, resp: falcon.Response):
image_url = req.get_param("image_url", required=True)
Expand Down Expand Up @@ -1329,18 +1317,6 @@ def check_server_domain(server_domain: str):
)


class WebhookProductResource:
"""DEPRECATED
Robotoff used to be notified of product updates from Product Opener using
webhooks, it now relies on Redis stream using the update-listener service.
"""

def on_post(self, req: falcon.Request, resp: falcon.Response):
resp.media = {
"status": "scheduled",
}


def question_insight_type_sort_func(insight: ProductInsight) -> int:
"""Function to sort questions on a specific product by priority.
Expand Down Expand Up @@ -1874,9 +1850,7 @@ def custom_handle_uncaught_exception(
api.add_route("/api/v1/predict/lang", LanguagePredictorResource())
api.add_route("/api/v1/predict/lang/product", ProductLanguagePredictorResource())
api.add_route("/api/v1/products/dataset", UpdateDatasetResource())
api.add_route("/api/v1/webhook/product", WebhookProductResource())
api.add_route("/api/v1/images", ImageCollection())
api.add_route("/api/v1/images/import", ImageImporterResource())
api.add_route("/api/v1/images/crop", ImageCropResource())
api.add_route("/api/v1/image_predictions", ImagePredictionResource())
api.add_route("/api/v1/image_predictions/import", ImagePredictionImporterResource())
Expand Down

0 comments on commit c53617d

Please sign in to comment.