X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Fapi%2Fsrc%2Flocal_user%2Fget_captcha.rs;h=5f1079ef238851deda151092208df357094ffdc3;hb=1d38aad9d3d51ef606074d5b49a8030c49dd0e9e;hp=92653cfc6c1c7a16ca2df8eb1b70b97861128641;hpb=73492af4b09448684ffde3d55454434ec3ed490b;p=lemmy.git diff --git a/crates/api/src/local_user/get_captcha.rs b/crates/api/src/local_user/get_captcha.rs index 92653cfc..5f1079ef 100644 --- a/crates/api/src/local_user/get_captcha.rs +++ b/crates/api/src/local_user/get_captcha.rs @@ -17,7 +17,7 @@ impl Perform for GetCaptcha { #[tracing::instrument(skip(context))] async fn perform(&self, context: &Data) -> Result { - let local_site = LocalSite::read(context.pool()).await?; + let local_site = LocalSite::read(&mut context.pool()).await?; if !local_site.captcha_enabled { return Ok(GetCaptchaResponse { ok: None }); @@ -37,7 +37,7 @@ impl Perform for GetCaptcha { let captcha_form: CaptchaAnswerForm = CaptchaAnswerForm { answer }; // Stores the captcha item in the db - let captcha = CaptchaAnswer::insert(context.pool(), &captcha_form).await?; + let captcha = CaptchaAnswer::insert(&mut context.pool(), &captcha_form).await?; Ok(GetCaptchaResponse { ok: Some(CaptchaResponse {