diff options
Diffstat (limited to 'server/src/routes/ui/assets.rs')
-rw-r--r-- | server/src/routes/ui/assets.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/server/src/routes/ui/assets.rs b/server/src/routes/ui/assets.rs index a01c8bc..bd48f35 100644 --- a/server/src/routes/ui/assets.rs +++ b/server/src/routes/ui/assets.rs @@ -80,10 +80,9 @@ pub async fn r_item_poster( } }; let asset = asset.unwrap_or_else(|| { - AssetInner::Assets(format!("fallback-{:?}.avif", node.kind).into()) - .ser() + AssetInner::Assets(format!("fallback-{:?}.avif", node.kind).into()).ser() }); - Ok(Redirect::temporary(rocket::uri!(r_asset(asset.0, width)))) + Ok(Redirect::permanent(rocket::uri!(r_asset(asset.0, width)))) } #[get("/n/<id>/backdrop?<width>")] pub async fn r_item_backdrop( @@ -105,10 +104,9 @@ pub async fn r_item_backdrop( } }; let asset = asset.unwrap_or_else(|| { - AssetInner::Assets(format!("fallback-{:?}.avif", node.kind).into()) - .ser() + AssetInner::Assets(format!("fallback-{:?}.avif", node.kind).into()).ser() }); - Ok(Redirect::temporary(rocket::uri!(r_asset(asset.0, width)))) + Ok(Redirect::permanent(rocket::uri!(r_asset(asset.0, width)))) } #[get("/n/<id>/person/<index>/asset?<group>&<width>")] @@ -137,7 +135,7 @@ pub async fn r_person_asset( .headshot .to_owned() .unwrap_or(AssetInner::Assets("fallback-Person.avif".into()).ser()); - Ok(Redirect::temporary(rocket::uri!(r_asset(asset.0, width)))) + Ok(Redirect::permanent(rocket::uri!(r_asset(asset.0, width)))) } // TODO this can create "federation recursion" because track selection cannot be relied on. |