diff --git a/crates/tranquil-db/src/postgres/backlink.rs b/crates/tranquil-db/src/postgres/backlink.rs
index 1928c41..280cd87 100644
--- a/crates/tranquil-db/src/postgres/backlink.rs
+++ b/crates/tranquil-db/src/postgres/backlink.rs
@@ -4,6 +4,8 @@ use tranquil_db_traits::{Backlink, BacklinkRepository, DbError};
use tranquil_types::{AtUri, Nsid};
use uuid::Uuid;
+use super::col;
+use super::column_vec;
use super::user::map_sqlx_error;
pub struct PostgresBacklinkRepository {
@@ -49,7 +51,7 @@ impl BacklinkRepository for PostgresBacklinkRepository {
.await
.map_err(map_sqlx_error)?;
- Ok(results.into_iter().map(Into::into).collect())
+ column_vec(results, col::BACKLINKS_URI)
}
async fn add_backlinks(&self, repo_id: Uuid, backlinks: &[Backlink]) -> Result<(), DbError> {
diff --git a/crates/tranquil-db/src/postgres/blob.rs b/crates/tranquil-db/src/postgres/blob.rs
index f5428b4..6e69a83 100644
--- a/crates/tranquil-db/src/postgres/blob.rs
+++ b/crates/tranquil-db/src/postgres/blob.rs
@@ -6,7 +6,9 @@ use tranquil_db_traits::{
use tranquil_types::{AtUri, CidLink, Did, Tid};
use uuid::Uuid;
+use super::col;
use super::user::map_sqlx_error;
+use super::{column, column_vec, opt_column};
pub struct PostgresBlobRepository {
pool: PgPool,
@@ -42,7 +44,7 @@ impl BlobRepository for PostgresBlobRepository {
.await
.map_err(map_sqlx_error)?;
- Ok(result.map(CidLink::from))
+ opt_column(result, col::BLOBS_CID)
}
async fn get_blob_metadata(&self, cid: &CidLink) -> Result