diff options
author | Daniel García <[email protected]> | 2022-07-06 23:57:37 +0200 |
---|---|---|
committer | Daniel García <[email protected]> | 2022-07-06 23:57:37 +0200 |
commit | b64cf27038f04368af8f25aa80782d37471e6303 (patch) | |
tree | 76bca867885cb583d10a55ae29f93260bdee7a9c /src/api/admin.rs | |
parent | 0c4e79cff6d340f1e8801ec804349250b9091035 (diff) | |
download | vaultwarden-b64cf27038f04368af8f25aa80782d37471e6303.tar.gz vaultwarden-b64cf27038f04368af8f25aa80782d37471e6303.zip |
Upgrade dependencies and swap lettre to async transport
Diffstat (limited to 'src/api/admin.rs')
-rw-r--r-- | src/api/admin.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/admin.rs b/src/api/admin.rs index 63edde66..2565445a 100644 --- a/src/api/admin.rs +++ b/src/api/admin.rs @@ -276,7 +276,7 @@ async fn invite_user(data: Json<InviteData>, _token: AdminToken, conn: DbConn) - async fn _generate_invite(user: &User, conn: &DbConn) -> EmptyResult { if CONFIG.mail_enabled() { - mail::send_invite(&user.email, &user.uuid, None, None, &CONFIG.invitation_org_name(), None) + mail::send_invite(&user.email, &user.uuid, None, None, &CONFIG.invitation_org_name(), None).await } else { let invitation = Invitation::new(user.email.clone()); invitation.save(conn).await @@ -290,11 +290,11 @@ async fn invite_user(data: Json<InviteData>, _token: AdminToken, conn: DbConn) - } #[post("/test/smtp", data = "<data>")] -fn test_smtp(data: Json<InviteData>, _token: AdminToken) -> EmptyResult { +async fn test_smtp(data: Json<InviteData>, _token: AdminToken) -> EmptyResult { let data: InviteData = data.into_inner(); if CONFIG.mail_enabled() { - mail::send_test(&data.email) + mail::send_test(&data.email).await } else { err!("Mail is not enabled") } |