]> littlesong.place Git - littlesongplace.git/commitdiff
Fix activity bug, signup bug
authorChris Fulljames <christianfulljames@gmail.com>
Sat, 22 Mar 2025 11:27:41 +0000 (07:27 -0400)
committerChris Fulljames <christianfulljames@gmail.com>
Sat, 22 Mar 2025 11:27:41 +0000 (07:27 -0400)
main.py
templates/activity.html
todo.txt

diff --git a/main.py b/main.py
index ff3b3ea411f733f4d2eb5779443bfe5ed1c23174..4feb0504f67aa5926d8474712f9cebf0d03f2a36 100644 (file)
--- a/main.py
+++ b/main.py
@@ -123,7 +123,7 @@ def signup_post():
     password = bcrypt.hashpw(password.encode(), bcrypt.gensalt())
     timestamp = datetime.now(timezone.utc).isoformat()
 
-    user_data = query_db("insert into users (username, password, created, threadid) values (?, ?, ?, ?) returning userid", [username, password, timestamp, threadid], one=True)
+    user_data = query_db("insert into users (username, password, created) values (?, ?, ?) returning userid", [username, password, timestamp], one=True)
 
     # Create profile comment thread
     threadid = create_comment_thread(ThreadType.PROFILE, user_data["userid"])
@@ -746,7 +746,7 @@ def activity():
                 one=True,
             )
             comment["playlistid"] = playlist["playlistid"]
-            comment["title"] = playlist["title"]
+            comment["name"] = playlist["name"]
             comment["content_userid"] = playlist["userid"]
             comment["content_username"] = playlist["username"]
 
index ba80ffab6e9e5dbe025d5dcbff659f136bb1a534..0837b6b90b690604ce44d28031d4406fec6f58bc 100644 (file)
@@ -20,7 +20,7 @@
             <a href="/song/{{ comment['content_userid'] }}/{{ comment['songid'] }}?action=view">{{ comment['title'] }}</a> -
             {# Nothing to do for user profile #}
             {% elif 'playlistid' in comment %}
-            <a href="/playlists/{{ comment['playlistid'] }}?action=view">{{ comment['title'] }}</a> -
+            <a href="/playlists/{{ comment['playlistid'] }}?action=view">{{ comment['name'] }}</a> -
             {% endif %}
             <a href="/users/{{ comment['content_username'] }}" class="profile-link">{{ comment['content_username'] }}</a>
             <div class="top-level-comment">
index ed33f2a2aa30a88170247bd7f8af560b357095fe..a99c925f26144a95e7dfc3dd0dc0ac606049441e 100644 (file)
--- a/todo.txt
+++ b/todo.txt
@@ -3,6 +3,7 @@ SOON
 - Generalize nofications
 - Userid in thread for owner? (to allow comment deletion)
 - Fix: refresh -> navigate -> back shows pre-refresh page
+- Fix: http errors not shown for form submissions
 - Player minimize button
 - Break up main.py, test_offline.py
 - Image support in comments, descriptions, bios, etc. (rich text?)