fix(routes): frontend url now is not optional

This commit is contained in:
əlemi 2025-01-22 02:08:13 +01:00
parent b67d278bd8
commit 1f36091ce3
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -75,8 +75,8 @@ pub async fn view(
}
// TODO this is known "magically" !! very tight coupling ouchhh
if let Some(ref fe) = ctx.cfg().instance.frontend {
user = user.set_url(Node::link(format!("{fe}/actors/{id}")));
if !ctx.cfg().instance.frontend.is_empty() {
user = user.set_url(Node::link(format!("{}/actors/{id}", ctx.cfg().instance.frontend)));
}
Ok(JsonLD(user.ld_context()))