mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-23 04:41:19 +00:00
Fix stuff broken by merge
This commit is contained in:
parent
a6cbbee3c7
commit
9d54354af4
5 changed files with 7 additions and 8 deletions
|
@ -17,7 +17,7 @@ impl Perform for GetCaptcha {
|
|||
|
||||
#[tracing::instrument(skip(context))]
|
||||
async fn perform(&self, context: &Data<LemmyContext>) -> Result<Self::Response, LemmyError> {
|
||||
let local_site = LocalSite::read(context.pool()).await?;
|
||||
let local_site = LocalSite::read(&mut *context.conn().await?).await?;
|
||||
|
||||
if !local_site.captcha_enabled {
|
||||
return Ok(GetCaptchaResponse { ok: None });
|
||||
|
|
|
@ -28,7 +28,7 @@ impl Perform for PasswordReset {
|
|||
|
||||
// Check for too many attempts (to limit potential abuse)
|
||||
let recent_resets_count = PasswordResetRequest::get_recent_password_resets_count(
|
||||
context.pool(),
|
||||
&mut *context.conn().await?,
|
||||
local_user_view.local_user.id,
|
||||
)
|
||||
.await?;
|
||||
|
|
|
@ -11,7 +11,7 @@ use crate::{
|
|||
CommentUpdateForm,
|
||||
},
|
||||
traits::{Crud, Likeable, Saveable},
|
||||
utils::{get_conn, naive_now, DbConn, DELETED_REPLACEMENT_TEXT},
|
||||
utils::{naive_now, DbConn, DELETED_REPLACEMENT_TEXT},
|
||||
};
|
||||
use diesel::{
|
||||
dsl::{insert_into, sql_query},
|
||||
|
|
|
@ -80,10 +80,9 @@ impl PasswordResetRequest {
|
|||
}
|
||||
|
||||
pub async fn get_recent_password_resets_count(
|
||||
pool: &DbPool,
|
||||
conn: &mut DbConn,
|
||||
user_id: LocalUserId,
|
||||
) -> Result<i64, Error> {
|
||||
let conn = &mut get_conn(pool).await?;
|
||||
password_reset_request
|
||||
.filter(local_user_id.eq(user_id))
|
||||
.filter(published.gt(now - 1.days()))
|
||||
|
|
|
@ -27,7 +27,7 @@ use crate::{
|
|||
PostUpdateForm,
|
||||
},
|
||||
traits::{Crud, Likeable, Readable, Saveable},
|
||||
utils::{get_conn, naive_now, DbConn, DbPool, DELETED_REPLACEMENT_TEXT, FETCH_LIMIT_MAX},
|
||||
utils::{naive_now, DbConn, DELETED_REPLACEMENT_TEXT, FETCH_LIMIT_MAX},
|
||||
};
|
||||
use ::url::Url;
|
||||
use diesel::{dsl::insert_into, result::Error, ExpressionMethods, QueryDsl, TextExpressionMethods};
|
||||
|
@ -103,8 +103,8 @@ impl Post {
|
|||
conn: &mut DbConn,
|
||||
for_creator_id: PersonId,
|
||||
) -> Result<Vec<Self>, Error> {
|
||||
let perma_deleted = "*Permananently Deleted*";
|
||||
let perma_deleted_url = "https://deleted.com";
|
||||
let _perma_deleted = "*Permananently Deleted*";
|
||||
let _perma_deleted_url = "https://deleted.com";
|
||||
|
||||
diesel::update(post.filter(creator_id.eq(for_creator_id)))
|
||||
.set((
|
||||
|
|
Loading…
Reference in a new issue