tirocinio-canali-steffo-acrate/acrate-webfinger/src/route.rs

23 lines
507 B
Rust
Raw Normal View History

2024-11-14 03:16:12 +00:00
use axum::http::StatusCode;
use axum_extra::extract::Query;
use serde::Deserialize;
#[derive(Debug, Clone, Deserialize)]
pub struct WebfingerQuery {
pub resource: String,
#[serde(default)]
pub rel: Vec<String>,
}
2024-11-14 03:16:12 +00:00
#[axum::debug_handler]
pub async fn webfinger_handler(
Query(WebfingerQuery {resource, rel}): Query<WebfingerQuery>
2024-11-14 03:16:12 +00:00
) -> StatusCode {
log::info!("Handling a WebFinger request!");
log::debug!("Resource is: {resource:#?}");
log::debug!("Rel is: {rel:#?}");
StatusCode::NO_CONTENT
}