From: Dessalines Date: Mon, 13 Jul 2020 13:42:03 +0000 (-0400) Subject: Fixing admin and mod sort order. Fixes #939 (#941) X-Git-Url: http://these/git/ui/assets/static/%7Bvideo_url%7D?a=commitdiff_plain;h=a7c1c472fea9ff860b62ad25113cfed0f0d8e0bf;p=lemmy.git Fixing admin and mod sort order. Fixes #939 (#941) --- diff --git a/server/lemmy_db/src/community_view.rs b/server/lemmy_db/src/community_view.rs index b465ddab..5c6bd81a 100644 --- a/server/lemmy_db/src/community_view.rs +++ b/server/lemmy_db/src/community_view.rs @@ -299,6 +299,7 @@ impl CommunityModeratorView { use super::community_view::community_moderator_view::dsl::*; community_moderator_view .filter(community_id.eq(from_community_id)) + .order_by(published) .load::(conn) } @@ -306,6 +307,7 @@ impl CommunityModeratorView { use super::community_view::community_moderator_view::dsl::*; community_moderator_view .filter(user_id.eq(from_user_id)) + .order_by(published) .load::(conn) } } diff --git a/server/lemmy_db/src/user_view.rs b/server/lemmy_db/src/user_view.rs index 84feba38..f2ac4742 100644 --- a/server/lemmy_db/src/user_view.rs +++ b/server/lemmy_db/src/user_view.rs @@ -157,7 +157,10 @@ impl UserView { pub fn admins(conn: &PgConnection) -> Result, Error> { use super::user_view::user_fast::dsl::*; - user_fast.filter(admin.eq(true)).load::(conn) + user_fast + .filter(admin.eq(true)) + .order_by(published) + .load::(conn) } pub fn banned(conn: &PgConnection) -> Result, Error> {