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

Function send_email_code

src/handler/common/send_email_code_handler.rs:8–17  ·  view source on GitHub ↗
(
    State(state): State<AppState>,
    Json(req): Json<SendCodeRequest>,
)

Source from the content-addressed store, hash-verified

6use result::http_result::{build_http_result, HttpResult};
7
8pub async fn send_email_code(
9 State(state): State<AppState>,
10 Json(req): Json<SendCodeRequest>,
11) -> HttpResult {
12 let svc = SendEmailCodeService::new(state.repos.clone(), state.config.clone(), state.cache.clone(), state.queue.clone());
13 match svc.send_code(req).await {
14 Ok(resp) => build_http_result(Some(resp), None),
15 Err(err) => build_http_result::<SendCodeResponse>(None, Some(err)),
16 }
17}

Callers

nothing calls this directly

Calls 2

build_http_resultFunction · 0.85
send_codeMethod · 0.45

Tested by

no test coverage detected