From 56add67481c4e6f3e23720c79ca7228afa73b69d Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Thu, 17 Nov 2022 13:06:12 +0100 Subject: [PATCH] rename toggle public status routes --- app/contributions/routes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/contributions/routes.py b/app/contributions/routes.py index cd9cdb4b..e0daf969 100644 --- a/app/contributions/routes.py +++ b/app/contributions/routes.py @@ -127,7 +127,7 @@ def create_tesseract_ocr_pipeline_model(): ) @bp.route('/tesseract-ocr-pipeline-models//toggle-public-status', methods=['POST']) -def share_tesseract_ocr_pipeline_model(tesseract_ocr_pipeline_model_id): +def toggle_tesseract_ocr_pipeline_model_public_status(tesseract_ocr_pipeline_model_id): tesseract_ocr_pipeline_model = TesseractOCRPipelineModel.query.get_or_404(tesseract_ocr_pipeline_model_id) if not (tesseract_ocr_pipeline_model.user == current_user or current_user.is_administrator()): abort(403) @@ -223,7 +223,7 @@ def create_spacy_nlp_pipeline_model(): ) @bp.route('/spacy-nlp-pipeline-models//toggle-public-status', methods=['POST']) -def share_spacy_nlp_pipeline_model(spacy_nlp_pipeline_model_id): +def toggle_spacy_nlp_pipeline_model_public_status(spacy_nlp_pipeline_model_id): spacy_nlp_pipeline_model = SpaCyNLPPipelineModel.query.get_or_404(spacy_nlp_pipeline_model_id) if not (spacy_nlp_pipeline_model.user == current_user or current_user.is_administrator()): abort(403)