magnetar/fe_calckey/src/summary_proxy.rs

20 lines
469 B
Rust

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!({}))
}