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

Function list_mod_versions

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

Source from the content-addressed store, hash-verified

389) -> Result<Json<ModCatalogEntry>, StatusCode> {
390 match state
391 .service
392 .get_mod(&mod_id)
393 .await
394 .map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?
395 {
396 Some(mut entry) => {
397 absolutize_download_url(
398 &mut entry.download_url,
399 request_base_url(&headers).as_deref(),
400 );
401 Ok(Json(entry))
402 }
403 None => Err(StatusCode::NOT_FOUND),
404 }
405}
406
407#[utoipa::path(
408 get,
409 path = "/v1/mods/{modId}/versions",

Callers

nothing calls this directly

Calls 4

internal_errorFunction · 0.85
request_base_urlFunction · 0.85
absolutize_download_urlFunction · 0.85
mod_versionsMethod · 0.80

Tested by

no test coverage detected