use axum::{extract::Query, routing::get, Json, Router};
use serde::Deserialize;
use crate::state::AppState;
pub fn router() -> Router<AppState> {
Router::new().route("/dashboard", get(get_dashboard).post(post_dashboard))
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
#[allow(dead_code)]
struct DashboardQuery {
workspace_id: Option<String>,
}
async fn get_dashboard(Query(_q): Query<DashboardQuery>) -> Json<serde_json::Value> {
Json(serde_json::json!({
"data": [],
"kind": "data",
"metadata": {
"mimeType": "application/json+a2ui",
"note": "A2UI protocol is not fully implemented in desktop mode"
}
}))
}
async fn post_dashboard(Json(_body): Json<serde_json::Value>) -> Json<serde_json::Value> {
Json(serde_json::json!({
"success": true,
"surfaceCount": 0,
"totalMessages": 0,
"note": "A2UI protocol is not fully implemented in desktop mode"
}))
}