MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / list_mod_servers

Function list_mod_servers

mserver/MasterService/src/http.rs:418–428  ·  view source on GitHub ↗
(
    State(state): State<AppState>,
    Path(mod_id): Path<String>,
)

Source from the content-addressed store, hash-verified

416)]
417async fn list_mod_versions(
418 State(state): State<AppState>,
419 headers: HeaderMap,
420 Path(mod_id): Path<String>,
421) -> Result<Json<Vec<ModCatalogEntry>>, (StatusCode, String)> {
422 let mut records = state
423 .service
424 .mod_versions(&mod_id)
425 .await
426 .map_err(|error| internal_error(&error))?;
427 let base = request_base_url(&headers);
428 for entry in &mut records {
429 absolutize_download_url(&mut entry.download_url, base.as_deref());
430 }
431 Ok(Json(records))

Callers

nothing calls this directly

Calls 2

internal_errorFunction · 0.85
mod_usage_serversMethod · 0.80

Tested by

no test coverage detected