use axum::{ Json, extract::{Path, State}, }; use serde::Deserialize; use serde_json::{Value, json}; use crate::{error::ApiError, state::AppState}; #[derive(Deserialize)] pub struct WorkspacePath { pub workspace_id: String, } pub async fn export_workspace( Path(path): Path, State(state): State, ) -> Result, ApiError> { let exported = state .service .export_workspace(&path.workspace_id.as_str().into()) .await?; Ok(Json(json!(exported))) }