.await
}
+ pub async fn list_featured_for_community(
+ pool: &DbPool,
+ the_community_id: CommunityId,
+ ) -> Result<Vec<Self>, Error> {
+ let conn = &mut get_conn(pool).await?;
+ post
+ .filter(community_id.eq(the_community_id))
+ .filter(deleted.eq(false))
+ .filter(removed.eq(false))
+ .filter(featured_community.eq(true))
+ .then_order_by(published.desc())
+ .limit(FETCH_LIMIT_MAX)
+ .load::<Self>(conn)
+ .await
+ }
+
pub async fn permadelete_for_creator(
pool: &DbPool,
for_creator_id: PersonId,