1use axum::{extract::Query, routing::get, Json, Router};
11use serde::Deserialize;
12
13use crate::state::AppState;
14
15pub fn router() -> Router<AppState> {
16 Router::new().route("/dashboard", get(get_dashboard).post(post_dashboard))
17}
18
19#[derive(Debug, Deserialize)]
20#[serde(rename_all = "camelCase")]
21#[allow(dead_code)]
22struct DashboardQuery {
23 workspace_id: Option<String>,
24}
25
26async fn get_dashboard(Query(_q): Query<DashboardQuery>) -> Json<serde_json::Value> {
28 Json(serde_json::json!({
30 "data": [],
31 "kind": "data",
32 "metadata": {
33 "mimeType": "application/json+a2ui",
34 "note": "A2UI protocol is not fully implemented in desktop mode"
35 }
36 }))
37}
38
39async fn post_dashboard(Json(_body): Json<serde_json::Value>) -> Json<serde_json::Value> {
41 Json(serde_json::json!({
43 "success": true,
44 "surfaceCount": 0,
45 "totalMessages": 0,
46 "note": "A2UI protocol is not fully implemented in desktop mode"
47 }))
48}