Remove old debug logging
This commit is contained in:
parent
3b88b82584
commit
bd43ad69d8
|
@ -67,9 +67,7 @@ pub async fn handle(request: &Request<Body>) -> Option<impl IntoResponse> {
|
||||||
match best {
|
match best {
|
||||||
Some(t) if t == &*AP_JSON || t == &*LD_JSON || *t == mime::APPLICATION_JSON => {
|
Some(t) if t == &*AP_JSON || t == &*LD_JSON || *t == mime::APPLICATION_JSON => {
|
||||||
let pool = request.extensions().get::<SqlitePool>().unwrap();
|
let pool = request.extensions().get::<SqlitePool>().unwrap();
|
||||||
if let Some(article_json) =
|
if let Some(article_json) = db::get_article_for_path(request.uri().path(), pool).await {
|
||||||
dbg!(db::get_article_for_path(request.uri().path(), pool).await)
|
|
||||||
{
|
|
||||||
let headers = [("Content-Type", best.unwrap().to_string())];
|
let headers = [("Content-Type", best.unwrap().to_string())];
|
||||||
Some((headers, article_json).into_response())
|
Some((headers, article_json).into_response())
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -47,21 +47,18 @@ pub async fn add_cached_actor(actor: &ActorExt, pool: &SqlitePool) -> anyhow::Re
|
||||||
.ok_or_else(|| anyhow!("missing actor id"))?;
|
.ok_or_else(|| anyhow!("missing actor id"))?;
|
||||||
debug!("adding cached actor {:?}", id);
|
debug!("adding cached actor {:?}", id);
|
||||||
let actor_json = serde_json::to_string(&actor)?;
|
let actor_json = serde_json::to_string(&actor)?;
|
||||||
dbg!(actor.preferred_username());
|
|
||||||
let mut display_name = actor
|
let mut display_name = actor
|
||||||
.name()
|
.name()
|
||||||
.and_then(|names| names.as_single_xsd_string().map(|s| s.to_owned()));
|
.and_then(|names| names.as_single_xsd_string().map(|s| s.to_owned()));
|
||||||
if display_name.as_ref().map_or(true, |s| s.is_empty()) {
|
if display_name.as_ref().map_or(true, |s| s.is_empty()) {
|
||||||
display_name = actor.preferred_username().map(|s| s.to_owned());
|
display_name = actor.preferred_username().map(|s| s.to_owned());
|
||||||
}
|
}
|
||||||
dbg!(&display_name);
|
|
||||||
let shared_inbox = actor
|
let shared_inbox = actor
|
||||||
.endpoints()?
|
.endpoints()?
|
||||||
.and_then(|endpoints| endpoints.shared_inbox)
|
.and_then(|endpoints| endpoints.shared_inbox)
|
||||||
.map(|s| s.as_str());
|
.map(|s| s.as_str());
|
||||||
let inbox = actor.inbox()?.as_str();
|
let inbox = actor.inbox()?.as_str();
|
||||||
// jesus christ this is ridiculously elaborate
|
// jesus christ this is ridiculously elaborate
|
||||||
dbg!(actor.icon());
|
|
||||||
let icon = actor
|
let icon = actor
|
||||||
.icon()
|
.icon()
|
||||||
.and_then(|icon| icon.as_one())
|
.and_then(|icon| icon.as_one())
|
||||||
|
|
|
@ -134,8 +134,6 @@ async fn verify_signature(
|
||||||
.ok_or(VerifySigError::MissingActorId)?
|
.ok_or(VerifySigError::MissingActorId)?
|
||||||
.as_str();
|
.as_str();
|
||||||
|
|
||||||
dbg!(force_refetch_actor);
|
|
||||||
dbg!(actor_id);
|
|
||||||
let actor = if force_refetch_actor {
|
let actor = if force_refetch_actor {
|
||||||
super::fetch_actor(actor_id, pool).await
|
super::fetch_actor(actor_id, pool).await
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue