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

Function list_servers

mserver/MasterService/src/http.rs:278–288  ·  view source on GitHub ↗
(
    State(state): State<AppState>,
    Query(query): Query<ListServersQuery>,
)

Source from the content-addressed store, hash-verified

276 } else if is_public_forwarded_ip(&request.address) {
277 request.server_id = format!("{}:{}", request.address, request.hostport);
278 } else {
279 return Err(publisher_error(
280 uri.path(),
281 &headers,
282 StatusCode::SERVICE_UNAVAILABLE,
283 "no public publisher address is available",
284 ));
285 }
286 }
287 let server_id = request.server_id.clone();
288 let now_unix_ms = current_time_millis();
289
290 let token_owner_found = if let Some(hash) = provided_hash.as_deref() {
291 match state

Callers

nothing calls this directly

Calls 2

internal_errorFunction · 0.85
listMethod · 0.45

Tested by

no test coverage detected