about summary refs log tree commit diff
path: root/src/database/postgres
diff options
context:
space:
mode:
Diffstat (limited to 'src/database/postgres')
-rw-r--r--src/database/postgres/mod.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/database/postgres/mod.rs b/src/database/postgres/mod.rs
index 1a1b98d..2c2dacc 100644
--- a/src/database/postgres/mod.rs
+++ b/src/database/postgres/mod.rs
@@ -100,11 +100,10 @@ WHERE
     }
     #[tracing::instrument(skip(self))]
     async fn post_exists(&self, url: &str) -> Result<bool> {
-        sqlx::query_as::<_, (bool,)>("SELECT exists(SELECT 1 FROM kittybox.mf2_json WHERE uid = $1 OR mf2['properties']['url'] ? $1)")
+        sqlx::query_scalar::<_, bool>("SELECT exists(SELECT 1 FROM kittybox.mf2_json WHERE uid = $1 OR mf2['properties']['url'] ? $1)")
             .bind(url)
             .fetch_one(&self.db)
             .await
-            .map(|v| v.0)
             .map_err(|err| err.into())
     }