PersonalWebApplication/Server/src/routes/client.rs
cc 2205408252 Initial commit: React client + Rust server full-stack project
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-17 20:49:17 +08:00

16 lines
477 B
Rust

//! 未来 .NET 客户端专用接口区。
//!
//! 与前端**不共用接口**。这里不挂 CORS——.NET 的 HttpClient 不是浏览器,
//! 不会发起/校验 CORS 预检,加了也没意义。后续客户端功能在此扩展。
use axum::{Json, Router, routing::get};
use serde_json::{Value, json};
pub fn router() -> Router {
Router::new().route("/api/client/health", get(health))
}
async fn health() -> Json<Value> {
Json(json!({ "status": "ok" }))
}