(
State(state): State<AppState>,
Json(req): Json<SendCodeRequest>,
)
| 6 | use result::http_result::{build_http_result, HttpResult}; |
| 7 | |
| 8 | pub 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 | } |
nothing calls this directly
no test coverage detected