From 7f2cbe82b1392e5e95af6d7d4f47ed3281f3fa9f Mon Sep 17 00:00:00 2001 From: Ewen Date: Thu, 9 May 2024 08:27:45 +0200 Subject: [PATCH] fix(backend): changed endpoint to `/api/feed/` --- README.md | 6 +++--- api/Dockerfile | 2 +- api/api/feed.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8b08f13..d5e2858 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ This project consists of two parts : You will need to have Docker and Docker Compose installed. Clone the repository, go to its root and run `docker-compose up -d`. -To use the backend directly, go to the page [http://localhost:8080/feed/](http://localhost:8080/feed/) and start adding parameters! +To use the backend directly, go to the page [http://localhost:8080/api/feed/](http://localhost:8080/api/feed/) and start adding parameters! ### For production @@ -44,5 +44,5 @@ To use the backend directly, go to the page [http://localhost:8080/feed/](http:/ (as of May 2024, the web pages can change over time and break the generated feeds) -- [http://localhost:8080/feed/?url=https://www.ouest-france.fr/bretagne/rennes-35000/&title=h2&titleClass=titre&article=article&datetime=time&link=a&linkClass=titre-lien§ion=section§ionClass=liste-articles&content=p&contentClass=chapeau&datetime=time&datetimeClass=meta-time](http://localhost:8080/feed/?url=https://www.ouest-france.fr/bretagne/rennes-35000/&title=h2&titleClass=titre&article=article&datetime=time&link=a&linkClass=titre-lien§ion=section§ionClass=liste-articles&content=p&contentClass=chapeau&datetime=time&datetimeClass=meta-time) -- [http://localhost:8080/feed/?url=ewen.korr.bzh/fr/cv/&article=div&articleClass=card&title=h4&content=div&contentClass=details&link=None](http://localhost:8080/feed/?url=ewen.korr.bzh/fr/cv/&article=div&articleClass=card&title=h4&content=div&contentClass=details&link=None) \ No newline at end of file +- [http://localhost:8080/api/feed/?url=https://www.ouest-france.fr/bretagne/rennes-35000/&title=h2&titleClass=titre&article=article&datetime=time&link=a&linkClass=titre-lien§ion=section§ionClass=liste-articles&content=p&contentClass=chapeau&datetime=time&datetimeClass=meta-time](http://localhost:8080/api/feed/?url=https://www.ouest-france.fr/bretagne/rennes-35000/&title=h2&titleClass=titre&article=article&datetime=time&link=a&linkClass=titre-lien§ion=section§ionClass=liste-articles&content=p&contentClass=chapeau&datetime=time&datetimeClass=meta-time) +- [http://localhost:8080/api/feed/?url=ewen.korr.bzh/fr/cv/&article=div&articleClass=card&title=h4&content=div&contentClass=details&link=None](http://localhost:8080/api/feed/?url=ewen.korr.bzh/fr/cv/&article=div&articleClass=card&title=h4&content=div&contentClass=details&link=None) \ No newline at end of file diff --git a/api/Dockerfile b/api/Dockerfile index 9a83575..9766b68 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11-alpine as requirements +FROM python:3.11-alpine as backend RUN apk update \ && apk add --no-cache \ diff --git a/api/api/feed.py b/api/api/feed.py index 82c150f..04720ee 100644 --- a/api/api/feed.py +++ b/api/api/feed.py @@ -8,7 +8,7 @@ from api.db import get_db from .scraper import scrape -bp = Blueprint("feed", __name__, url_prefix="/feed") +bp = Blueprint("feed", __name__, url_prefix="/api/feed") class InvalidParameters(Exception):