21 lines
427 B
Rust
21 lines
427 B
Rust
use axum::{
|
|
Json,
|
|
extract::{Path, State},
|
|
};
|
|
use serde_json::{Value, json};
|
|
|
|
use crate::{
|
|
error::ApiError,
|
|
routes::access::WorkspacePath,
|
|
state::AppState,
|
|
};
|
|
|
|
pub async fn list_protocol_capabilities(
|
|
Path(_path): Path<WorkspacePath>,
|
|
State(state): State<AppState>,
|
|
) -> Result<Json<Value>, ApiError> {
|
|
Ok(Json(json!({
|
|
"items": state.service.list_protocol_capabilities().await
|
|
})))
|
|
}
|