From 779ae32ad811b39f38d4b5adf14c71a7a5c8c60e Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 24 Sep 2024 15:28:54 -0500 Subject: Redirect to listing page for now — remove extra endpoint. Until I know whether or not we'll be needing the extra "view platform" feature, I've elected to remove the endpoint for now. --- uploader/platforms/views.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'uploader/platforms/views.py') diff --git a/uploader/platforms/views.py b/uploader/platforms/views.py index 0a4eabb..2ff45b8 100644 --- a/uploader/platforms/views.py +++ b/uploader/platforms/views.py @@ -109,16 +109,5 @@ def create_platform(species_id: int): species_id=species_id)) flash("Platform created successfully", "alert-success") - return redirect(url_for("species.platforms.view_platform", - species_id=species_id, - platform_id=new_platform["Id"])) - - -@platformsbp.route("/platforms//view", - methods=["GET"]) -@require_login -def view_platform(species_id: int, platform_id: int): - """View details for a specific platform.""" - with database_connection(app.config["SQL_URI"]) as conn: - return platform_by_species_and_id( - conn, species_id, platform_id) + return redirect(url_for("species.platforms.list_platforms", + species_id=species_id)) -- cgit v1.2.3