unfucked not found errors

This commit is contained in:
emilis 2022-09-11 16:56:49 +01:00
parent 8be8d0ebe1
commit 8fe959967e
1 changed files with 6 additions and 7 deletions

View File

@ -30,18 +30,17 @@ impl Server {
warp::path!("@" / String) warp::path!("@" / String)
.and(Self::with_server(self.clone())) .and(Self::with_server(self.clone()))
.and_then(|username: String, srv: Server| async move { .and_then(|username: String, srv: Server| async move {
match srv srv.hb
.hb
.render( .render(
"profile", "profile",
&serde_json::json!(srv.profiler.profile(username).await?), &serde_json::json!(srv
.profiler
.profile(username)
.await
.map_err(|e| ServerError::from(e))?),
) )
.map(|html| warp::reply::html(html)) .map(|html| warp::reply::html(html))
.map_err(|e| ServerError::from(e).reject_self()) .map_err(|e| ServerError::from(e).reject_self())
{
Ok(resp) => Ok(resp),
Err(err) => Err(err),
}
}), }),
) )
} }