MCPcopy Create free account
hub / github.com/Ember-Moth/ppanel / create_node

Function create_node

src/handler/admin/server/create_node_handler.rs:9–17  ·  view source on GitHub ↗
(
    State(state): State<AppState>,
    Json(req): Json<CreateNodeRequest>,
)

Source from the content-addressed store, hash-verified

7use result::http_result::{build_http_result, HttpResult};
8
9pub async fn create_node(
10 State(state): State<AppState>,
11 Json(req): Json<CreateNodeRequest>,
12) -> HttpResult {
13 match create_node_service::create_node(state.repos.node.as_ref(), req).await {
14 Ok(data) => build_http_result(Some(data), None),
15 Err(e) => build_http_result::<()>(None, Some(e)),
16 }
17}

Callers

nothing calls this directly

Calls 1

build_http_resultFunction · 0.85

Tested by

no test coverage detected