Working apalis cron and worker with 0.6.0-rc.5

Also renamed `pool` variables throughout codebase to `db` for clarity.
This commit is contained in:
2024-08-21 01:10:26 -04:00
parent 764d3f23b8
commit a3450e202a
27 changed files with 148 additions and 232 deletions

View File

@@ -59,7 +59,7 @@ pub async fn get(hx_target: Option<TypedHeader<HXTarget>>, layout: Layout) -> Re
}
pub async fn post(
State(pool): State<PgPool>,
State(db): State<PgPool>,
State(mailer): State<SmtpTransport>,
State(config): State<Config>,
mut auth: AuthSession,
@@ -80,7 +80,7 @@ pub async fn post(
));
}
let user = match User::create(
&pool,
&db,
CreateUser {
email: register.email.clone(),
password: register.password.clone(),
@@ -144,7 +144,7 @@ pub async fn post(
}
};
send_confirmation_email(pool, mailer, config, user.clone());
send_confirmation_email(db, mailer, config, user.clone());
auth.login(&user)
.await