Function notedealer::http_api::get_ap_object
source · [−]pub async fn get_ap_object(
uri: Uri,
db: Data<&'static Database>,
server_url: Data<CanonicalServerUrl>,
query: Query<ApRetrievalParams>
) -> HttpResponseExpand description
Http responder for GETs to ActivityPub ids.
Combines the path and query from uri to the base url in server_url to
create an id, then attempts to fetch it from the db. Returns a 404 if
there’s no such object, and a 503 if the database query fails (generally
caused by database downtime).