use super::community_view::community_moderator_view::dsl::*;
community_moderator_view
.filter(community_id.eq(from_community_id))
+ .order_by(published)
.load::<Self>(conn)
}
use super::community_view::community_moderator_view::dsl::*;
community_moderator_view
.filter(user_id.eq(from_user_id))
+ .order_by(published)
.load::<Self>(conn)
}
}
pub fn admins(conn: &PgConnection) -> Result<Vec<Self>, Error> {
use super::user_view::user_fast::dsl::*;
- user_fast.filter(admin.eq(true)).load::<Self>(conn)
+ user_fast
+ .filter(admin.eq(true))
+ .order_by(published)
+ .load::<Self>(conn)
}
pub fn banned(conn: &PgConnection) -> Result<Vec<Self>, Error> {