context: Data<LemmyContext>,
) -> Result<HttpResponse, LemmyError> {
let id = CommentId(info.comment_id.parse::<i32>()?);
- let comment: ApubComment = Comment::read(context.pool(), id).await?.into();
+ let comment: ApubComment = Comment::read(&mut context.pool(), id).await?.into();
if !comment.local {
return Err(err_object_not_local());
}
if !comment.deleted && !comment.removed {
- Ok(create_apub_response(&comment.into_json(&context).await?))
+ create_apub_response(&comment.into_json(&context).await?)
} else {
- Ok(create_apub_tombstone_response(comment.ap_id.clone()))
+ create_apub_tombstone_response(comment.ap_id.clone())
}
}