MCPcopy Create free account
hub / github.com/actix/examples / register_user

Function register_user

auth/simple-auth-server/src/register_handler.rs:18–33  ·  view source on GitHub ↗
(
    invitation_id: web::Path<String>,
    user_data: web::Json<UserData>,
    pool: web::Data<Pool>,
)

Source from the content-addressed store, hash-verified

16}
17
18pub async fn register_user(
19 invitation_id: web::Path<String>,
20 user_data: web::Json<UserData>,
21 pool: web::Data<Pool>,
22) -> Result<HttpResponse, actix_web::Error> {
23 let user = web::block(move || {
24 query(
25 invitation_id.into_inner(),
26 user_data.into_inner().password,
27 pool,
28 )
29 })
30 .await??;
31
32 Ok(HttpResponse::Ok().json(&user))
33}
34
35fn query(
36 invitation_id: String,

Callers

nothing calls this directly

Calls 1

queryFunction · 0.70

Tested by

no test coverage detected