magnetar/fe_calckey/src/summary_proxy.rs

20 lines
469 B
Rust
Raw Normal View History

2023-07-07 19:22:30 +00:00
use axum::extract::Query;
use axum::Json;
use serde::Deserialize;
use serde_json::{json, Value};
#[derive(Deserialize)]
pub struct SummaryRequest {
url: String,
}
pub async fn generate_summary(
Query(SummaryRequest { url: _url }): Query<SummaryRequest>,
) -> Json<Value> {
// TODO: Stub, implement at least OpenGraph cards
// Will need a HTTP client and a HTML parser at least
// Would be nice to provide YouTube/... embeds
Json(json!({}))
}