use std::path::Path; use lazy_static::lazy_static; use crate::server::server_state::ServerState; use axum::{debug_handler, extract::State, http::StatusCode, Json}; use crate::models::card::CardTable; lazy_static! { static ref CARD_TABLE: CardTable = CardTable::new_from_server_json(Path::new("./data/cardinfo.json")); } #[debug_handler] pub async fn get_card_table(State(_): State) -> Result, StatusCode> { Ok(Json(CARD_TABLE.clone())) }