activitypub-federation-rust/examples/local_federation/axum/mod.rs

13 lines
348 B
Rust
Raw Normal View History

use crate::error::Error;
use ::http::StatusCode;
use axum::response::{IntoResponse, Response};
2023-03-01 23:19:10 +00:00
#[allow(clippy::diverging_sub_expression, clippy::items_after_statements)]
pub mod http;
impl IntoResponse for Error {
fn into_response(self) -> Response {
(StatusCode::INTERNAL_SERVER_ERROR, format!("{}", self.0)).into_response()
}
}