use crate::Perform;
use actix_web::web::Data;
use lemmy_api_common::{
- blocking,
comment::{CommentResponse, SaveComment},
- get_local_user_view_from_jwt,
+ utils::{blocking, get_local_user_view_from_jwt},
};
use lemmy_db_schema::{
source::comment::{CommentSaved, CommentSavedForm},
traits::Saveable,
};
-use lemmy_db_views::comment_view::CommentView;
-use lemmy_utils::{ConnectionId, LemmyError};
+use lemmy_db_views::structs::CommentView;
+use lemmy_utils::{error::LemmyError, ConnectionId};
use lemmy_websocket::LemmyContext;
#[async_trait::async_trait(?Send)]
};
if data.save {
- let save_comment = move |conn: &'_ _| CommentSaved::save(conn, &comment_saved_form);
+ let save_comment = move |conn: &mut _| CommentSaved::save(conn, &comment_saved_form);
blocking(context.pool(), save_comment)
.await?
.map_err(|e| LemmyError::from_error_message(e, "couldnt_save_comment"))?;
} else {
- let unsave_comment = move |conn: &'_ _| CommentSaved::unsave(conn, &comment_saved_form);
+ let unsave_comment = move |conn: &mut _| CommentSaved::unsave(conn, &comment_saved_form);
blocking(context.pool(), unsave_comment)
.await?
.map_err(|e| LemmyError::from_error_message(e, "couldnt_save_comment"))?;