From 6f58338cc24d2e44a70a6028ecf86d8db92b83a1 Mon Sep 17 00:00:00 2001 From: Bas Kasemir <20270816+BasMonkey@users.noreply.github.com> Date: Fri, 23 Feb 2024 11:55:51 +0100 Subject: [PATCH] Removed trailing slashes of endpoints --- ExonCov/api_views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ExonCov/api_views.py b/ExonCov/api_views.py index 71d8c25..ccc19da 100644 --- a/ExonCov/api_views.py +++ b/ExonCov/api_views.py @@ -44,7 +44,7 @@ def sample_by_id_api(sample_id): return jsonify(result) -@app.route('/api/samples/') +@app.route('/api/samples') @token_required def get_samples_api(): sample_name = request.args.get('sample_name') or '' @@ -63,7 +63,7 @@ def get_samples_api(): return jsonify(samples_list) -@app.route('/api/sample//run//') +@app.route('/api/sample//run/') @token_required def get_summary_by_sample_name_and_run_id_api(sample_name, run_id): samples = get_samples_by_like_sample_name_or_like_run_id(sample_name, run_id) @@ -73,14 +73,14 @@ def get_summary_by_sample_name_and_run_id_api(sample_name, run_id): return jsonify(samples_list) -@app.route('/api/samples/name//') +@app.route('/api/samples/name/') @token_required def get_sample_by_sample_name_api(sample_name): sample = get_sample_by_sample_name(sample_name) return jsonify(model_to_dict(sample)) -@app.route('/api/sample/run//') +@app.route('/api/sample/run/') @token_required def get_summary_by_run_id_api(run_id): samples = get_sample_by_like_run_id(run_id)