From db402777cbcd6a20c954e48dd6adb1f5c6602154 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Tue, 5 Mar 2024 22:32:23 +0100 Subject: [PATCH] Revert hack for parent_comment_id --- server/src/db.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/db.rs b/server/src/db.rs index 7b4e314..d9d49e4 100644 --- a/server/src/db.rs +++ b/server/src/db.rs @@ -16,7 +16,7 @@ pub async fn db_new_comment( let insert_query = sqlx::query!( "INSERT INTO comments (parent_post_id, parent_comment_id, author_user_id, content) VALUES ($1, $2, $3, $4)", parent_post_id, - parent_comment_id.unwrap_or(-1), // This is a bit of a hack + parent_comment_id, user_id, content )