nfsense/src/api/network.rs
2023-10-28 15:44:12 +02:00

13 lines
323 B
Rust

use jsonrpsee::types::Params;
use crate::{definitions::network::StaticRoute, state::RpcState};
use super::ApiError;
pub fn get_static_routes(_: Params, state: &RpcState) -> Result<Vec<StaticRoute>, ApiError> {
Ok(state
.config_manager
.get_pending_config()
.network
.static_routes)
}