From 0afeb8d2b8ed09d43d24a65651107f603e6fdd92 Mon Sep 17 00:00:00 2001 From: Louis Gallet Date: Mon, 1 Jul 2024 17:18:10 +0200 Subject: [PATCH] feat: :recycle: Remake url --- main.py | 4 ++-- templates/found.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 171ed5c..df6ed61 100644 --- a/main.py +++ b/main.py @@ -54,7 +54,7 @@ def create_playlist(): return render_template("create.html", response='Request failed', comment=e, type="error") @app.route('/search/', methods=['GET', 'POST']) -def main_app(roomid): +def search(roomid): if len(roomid) != 8 or not cursor.execute("SELECT * FROM rooms WHERE roomid = ?", (roomid,)).fetchone(): return main() playlistName = cursor.execute("SELECT playlist_name FROM rooms WHERE roomid = ?", (roomid,)).fetchone()[0] @@ -69,7 +69,7 @@ def main_app(roomid): # otherwise handle the GET request return render_template("search.html", roomid=roomid, playlistName=playlistName, spotifyURL=spotifyURL) -@app.route('/add///', methods=['GET']) +@app.route('/add/room//playlist//track/', methods=['GET']) def add_to_playlist(roomid, playlistID, trackid): print(roomid) print(playlistID) diff --git a/templates/found.html b/templates/found.html index 5bd224f..6f54ddb 100644 --- a/templates/found.html +++ b/templates/found.html @@ -41,7 +41,7 @@
{{ track[0] }}

{{ track[1] }} - {{ track[2] }}

-
+