monorepo/visions/server/src/routes.rs

10 lines
305 B
Rust

use crate::{core::Core, handlers::handle_playing_field};
use warp::{reply::Json, Filter};
pub fn route_playing_field(
_app: Core,
) -> impl Filter<Extract = (Json,), Error = warp::Rejection> + Clone {
warp::path!("api" / "v1" / "field").map(move || warp::reply::json(&handle_playing_field()))
}