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

Function post_invitation

auth/simple-auth-server/src/invitation_handler.rs:15–23  ·  view source on GitHub ↗
(
    invitation_data: web::Json<InvitationData>,
    pool: web::Data<Pool>,
)

Source from the content-addressed store, hash-verified

13}
14
15pub async fn post_invitation(
16 invitation_data: web::Json<InvitationData>,
17 pool: web::Data<Pool>,
18) -> Result<HttpResponse, actix_web::Error> {
19 // run diesel blocking code
20 web::block(move || create_invitation(invitation_data.into_inner().email, pool)).await??;
21
22 Ok(HttpResponse::Ok().finish())
23}
24
25fn create_invitation(
26 eml: String,

Callers

nothing calls this directly

Calls 1

create_invitationFunction · 0.85

Tested by

no test coverage detected