From 67a4c833199b9f9def324dcbdca46edd3a8d99e5 Mon Sep 17 00:00:00 2001 From: alemi Date: Sun, 10 Nov 2024 22:11:10 +0100 Subject: [PATCH] fix(web): must use api url not web url --- web/src/objects/view.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/web/src/objects/view.rs b/web/src/objects/view.rs index b4e12f3..7bf11b8 100644 --- a/web/src/objects/view.rs +++ b/web/src/objects/view.rs @@ -35,7 +35,9 @@ pub fn ObjectView() -> impl IntoView { }, Some(Some(o)) => { let object = o.clone(); - let base = Uri::web(U::Object, o.id().unwrap_or_default()); + let oid = o.id().unwrap_or_default(); + let base = Uri::web(U::Object, oid); + let api = Uri::api(U::Object, oid, false); view!{
@@ -43,7 +45,7 @@ pub fn ObjectView() -> impl IntoView { "🕸️"" "context" | ""📫"" "replies {if auth.present() { Some(view! { - " | ""↺" + " | ""↺" }) } else { None }} @@ -55,7 +57,7 @@ pub fn ObjectView() -> impl IntoView { fn crawl(base: String, auth: Auth) { spawn_local(async move { - if let Err(e) = Http::fetch::(&format!("{URL_BASE}{base}/replies?fetch=true"), auth).await { + if let Err(e) = Http::fetch::(&format!("{base}/replies?fetch=true"), auth).await { tracing::error!("failed crawling replies for {base}: {e}"); } });