From cfbf7344f1237a62b45ef7534fb5d88db6c2d87d Mon Sep 17 00:00:00 2001 From: Chris Fulljames Date: Sat, 22 Mar 2025 07:27:41 -0400 Subject: [PATCH] Fix activity bug, signup bug --- main.py | 4 ++-- templates/activity.html | 2 +- todo.txt | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index ff3b3ea..4feb050 100644 --- 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"] diff --git a/templates/activity.html b/templates/activity.html index ba80ffa..0837b6b 100644 --- a/templates/activity.html +++ b/templates/activity.html @@ -20,7 +20,7 @@ {{ comment['title'] }} - {# Nothing to do for user profile #} {% elif 'playlistid' in comment %} - {{ comment['title'] }} - + {{ comment['name'] }} - {% endif %} {{ comment['content_username'] }}
diff --git a/todo.txt b/todo.txt index ed33f2a..a99c925 100644 --- 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?) -- 2.39.5