X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Fdb_schema%2Fsrc%2Faggregates%2Fperson_post_aggregates.rs;h=1cbaa242215b4cd1df4c8a010171442ab0e80a95;hb=1d38aad9d3d51ef606074d5b49a8030c49dd0e9e;hp=5fe1aacffe130ac4ad5dfa2ec03071432007c8b0;hpb=73492af4b09448684ffde3d55454434ec3ed490b;p=lemmy.git diff --git a/crates/db_schema/src/aggregates/person_post_aggregates.rs b/crates/db_schema/src/aggregates/person_post_aggregates.rs index 5fe1aacf..1cbaa242 100644 --- a/crates/db_schema/src/aggregates/person_post_aggregates.rs +++ b/crates/db_schema/src/aggregates/person_post_aggregates.rs @@ -9,7 +9,10 @@ use diesel::{insert_into, result::Error, ExpressionMethods, QueryDsl}; use diesel_async::RunQueryDsl; impl PersonPostAggregates { - pub async fn upsert(pool: &DbPool, form: &PersonPostAggregatesForm) -> Result { + pub async fn upsert( + pool: &mut DbPool<'_>, + form: &PersonPostAggregatesForm, + ) -> Result { let conn = &mut get_conn(pool).await?; insert_into(person_post_aggregates) .values(form) @@ -19,7 +22,11 @@ impl PersonPostAggregates { .get_result::(conn) .await } - pub async fn read(pool: &DbPool, person_id_: PersonId, post_id_: PostId) -> Result { + pub async fn read( + pool: &mut DbPool<'_>, + person_id_: PersonId, + post_id_: PostId, + ) -> Result { let conn = &mut get_conn(pool).await?; person_post_aggregates .filter(post_id.eq(post_id_).and(person_id.eq(person_id_)))