From 090a010a63b55cc611d3f4fb89ad022b00582895 Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Sat, 31 Aug 2024 13:23:25 -0700 Subject: [PATCH] server: fix thread id for news posts --- server/src/newsreader.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/newsreader.rs b/server/src/newsreader.rs index 86c7512..98cc60d 100644 --- a/server/src/newsreader.rs +++ b/server/src/newsreader.rs @@ -144,12 +144,12 @@ pub async fn tags(pool: &PgPool, _needs_unread: bool) -> Result, Server } pub async fn thread(pool: &PgPool, thread_id: String) -> Result { - let thread_id = thread_id + let id = thread_id .strip_prefix(THREAD_PREFIX) .expect("news thread doesn't start with '{THREAD_PREFIX}'") .to_string(); - let r = sqlx::query_file!("sql/thread.sql", thread_id) + let r = sqlx::query_file!("sql/thread.sql", id) .fetch_one(pool) .await?;