async fn perform(&self, context: &Data<LemmyContext>) -> Result<CommentResponse, LemmyError> {
let data: &EditComment = self;
let local_user_view = local_user_view_from_jwt(&data.auth, context).await?;
- let local_site = LocalSite::read(context.pool()).await?;
+ let local_site = LocalSite::read(&mut context.pool()).await?;
let comment_id = data.comment_id;
- let orig_comment = CommentView::read(context.pool(), comment_id, None).await?;
+ let orig_comment = CommentView::read(&mut context.pool(), comment_id, None).await?;
check_community_ban(
local_user_view.person.id,
orig_comment.community.id,
- context.pool(),
+ &mut context.pool(),
)
.await?;
let language_id = self.language_id;
CommunityLanguage::is_allowed_community_language(
- context.pool(),
+ &mut context.pool(),
language_id,
orig_comment.community.id,
)
.language_id(data.language_id)
.updated(Some(Some(naive_now())))
.build();
- let updated_comment = Comment::update(context.pool(), comment_id, &form)
+ let updated_comment = Comment::update(&mut context.pool(), comment_id, &form)
.await
.with_lemmy_type(LemmyErrorType::CouldntUpdateComment)?;