refactor: rename variable task to songId

This commit is contained in:
robin committed 2026-11-13 15:29:27 +01:00
1 parent 6595eed927
commit 203bab6cf7
2 files changed
+4 -4

No files matched your search

+3 -3
View File
@@ -322,10 +322,10 @@ def admin_list():
songs = load_songs_list()
return render_template("admin_tasksList.html", songs=songs)
@bp.route("/admin/add/<task>")
@bp.route("/admin/add/<songId>")
@admin_required
def admin_add_task(task):
print(task)
def admin_add_task(songId):
print(songId)
return render_template("admin_add_task.html")
@bp.route("/api/admin/add", methods=["POST"])
+1 -1
View File
@@ -25,7 +25,7 @@
{% for s in songs %}
<tr>
<td class="toggle">
<a href="{{ url_for('main.admin_add_task', task=s.id) }}">+</a>
<a href="{{ url_for('main.admin_add_task', songId=s.id) }}">+</a>
</td>
<td>{{ s.name }}</td>
<td>{{ s.artist }}</td>