From cf9ad135dbeb9b3bd5517b47df9c18edee436ba6 Mon Sep 17 00:00:00 2001 From: Colin Reeder Date: Sun, 25 Oct 2020 22:31:15 -0600 Subject: Also process post href for user things list --- src/routes/api/mod.rs | 2 +- src/routes/api/users.rs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/routes/api/mod.rs b/src/routes/api/mod.rs index 14c7f71..05c9ec0 100644 --- a/src/routes/api/mod.rs +++ b/src/routes/api/mod.rs @@ -143,7 +143,7 @@ enum RespThingInfo<'a> { #[serde(rename = "post")] Post { id: PostLocalID, - href: Option<&'a str>, + href: Option>, title: &'a str, created: String, community: RespMinimalCommunityInfo<'a>, diff --git a/src/routes/api/users.rs b/src/routes/api/users.rs index d701963..3e593b3 100644 --- a/src/routes/api/users.rs +++ b/src/routes/api/users.rs @@ -705,9 +705,11 @@ async fn route_unstable_users_things_list( let community_local = row.get(7); let community_ap_id = row.get(8); + let post_id = PostLocalID(row.get(1)); + RespThingInfo::Post { - id: PostLocalID(row.get(1)), - href: row.get(2), + id: post_id, + href: ctx.process_href_opt(row.get(2), post_id), title: row.get(3), created, community: RespMinimalCommunityInfo { -- cgit v1.2.3