From f578278dba08bac90c7120690eaf3ddc76e29657 Mon Sep 17 00:00:00 2001 From: Andria Capai Date: Tue, 16 Jul 2024 10:32:16 +0200 Subject: [PATCH] fix: allow negative cd_ref MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - PR sur Taxhub associƩe : https://github.com/PnX-SI/TaxHub/pull/368 Reviewed-by: andriacap --- atlas/atlasAPI.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/atlas/atlasAPI.py b/atlas/atlasAPI.py index aeb736a7..b239c338 100644 --- a/atlas/atlasAPI.py +++ b/atlas/atlasAPI.py @@ -37,7 +37,7 @@ def searchCommuneAPI(): if not current_app.config["AFFICHAGE_MAILLE"]: - @api.route("/observationsMailleAndPoint/", methods=["GET"]) + @api.route("/observationsMailleAndPoint/", methods=["GET"]) def getObservationsMailleAndPointAPI(cd_ref): """ Retourne les observations d'un taxon en point et en maille @@ -55,7 +55,7 @@ def getObservationsMailleAndPointAPI(cd_ref): return jsonify(observations) -@api.route("/observationsMaille/", methods=["GET"]) +@api.route("/observationsMaille/", methods=["GET"]) def getObservationsMailleAPI(cd_ref): """ Retourne les observations d'un taxon par maille (et le nombre d'observation par maille) @@ -75,7 +75,7 @@ def getObservationsMailleAPI(cd_ref): if not current_app.config["AFFICHAGE_MAILLE"]: - @api.route("/observationsPoint/", methods=["GET"]) + @api.route("/observationsPoint/", methods=["GET"]) def getObservationsPointAPI(cd_ref): session = db.session observations = vmObservationsRepository.searchObservationsChilds(session, cd_ref) @@ -83,7 +83,7 @@ def getObservationsPointAPI(cd_ref): return jsonify(observations) -@api.route("/observations/", methods=["GET"]) +@api.route("/observations/", methods=["GET"]) def getObservationsGenericApi(cd_ref: int): """[summary] @@ -110,7 +110,7 @@ def getObservationsGenericApi(cd_ref: int): if not current_app.config["AFFICHAGE_MAILLE"]: - @api.route("/observations//", methods=["GET"]) + @api.route("/observations//", methods=["GET"]) def getObservationsCommuneTaxonAPI(insee, cd_ref): connection = db.engine.connect() observations = vmObservationsRepository.getObservationTaxonCommune( @@ -120,7 +120,7 @@ def getObservationsCommuneTaxonAPI(insee, cd_ref): return jsonify(observations) -@api.route("/observationsMaille//", methods=["GET"]) +@api.route("/observationsMaille//", methods=["GET"]) def getObservationsCommuneTaxonMailleAPI(insee, cd_ref): connection = db.engine.connect() observations = vmObservationsMaillesRepository.getObservationsTaxonCommuneMaille(