use axum::Json;
use super::super::types::{ServerCapabilities, ServerConfig};
pub(in crate::commands::serve) async fn get_config() -> Json<ServerConfig> {
Json(ServerConfig {
capabilities: ServerCapabilities {
linux_capabilities_enabled: true,
snapshots_enabled: true,
clone_enabled: true,
export_enabled: true,
import_enabled: true,
exec_user_enabled: true,
},
})
}
#[cfg(test)]
mod tests {
use super::*;
#[tokio::test]
async fn config_advertises_exec_user() {
assert!(get_config().await.0.capabilities.exec_user_enabled);
}
}