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

Function create_document

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

Source from the content-addressed store, hash-verified

7use result::http_result::{build_http_result, HttpResult};
8
9pub async fn create_document(
10 State(state): State<AppState>,
11 Json(req): Json<CreateDocumentRequest>,
12) -> HttpResult {
13 match create_document_service::create_document(state.repos.document.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