MCPcopy Create free account
hub / github.com/Barre/compact_log / handle_tile_request_with_path

Function handle_tile_request_with_path

src/api/mod.rs:131–138  ·  view source on GitHub ↗

Handler wrappers for tile routes

(
    state: axum::extract::State<Arc<ApiState>>,
    Path((level, index_path)): Path<(u8, String)>,
)

Source from the content-addressed store, hash-verified

129
130// Handler wrappers for tile routes
131async fn handle_tile_request_with_path(
132 state: axum::extract::State<Arc<ApiState>>,
133 Path((level, index_path)): Path<(u8, String)>,
134) -> Result<Response, (axum::http::StatusCode, axum::Json<ErrorResponse>)> {
135 // Parse the index path which may contain .p/{width}
136 let (index, width) = parse_tile_path(&index_path);
137 static_handlers::get_tile(state, Path((level, index, width))).await
138}
139
140async fn handle_data_tile_request_with_path(
141 state: axum::extract::State<Arc<ApiState>>,

Callers

nothing calls this directly

Calls 2

parse_tile_pathFunction · 0.85
get_tileFunction · 0.85

Tested by

no test coverage detected