Fixing modlog not showing bans and adds. Fixes #1376

This commit is contained in:
Dessalines 2021-01-26 11:45:36 -05:00
parent f0dcc3a104
commit 91d210ce79
4 changed files with 6 additions and 4 deletions

View file

@ -31,7 +31,7 @@ impl ModAddCommunityView {
let mut query = mod_add_community::table let mut query = mod_add_community::table
.inner_join(user_::table.on(mod_add_community::mod_user_id.eq(user_::id))) .inner_join(user_::table.on(mod_add_community::mod_user_id.eq(user_::id)))
.inner_join(community::table) .inner_join(community::table)
.inner_join(user_alias_1::table.on(mod_add_community::other_user_id.eq(user_::id))) .inner_join(user_alias_1::table.on(mod_add_community::other_user_id.eq(user_alias_1::id)))
.select(( .select((
mod_add_community::all_columns, mod_add_community::all_columns,
User_::safe_columns_tuple(), User_::safe_columns_tuple(),

View file

@ -27,7 +27,7 @@ impl ModAddView {
) -> Result<Vec<Self>, Error> { ) -> Result<Vec<Self>, Error> {
let mut query = mod_add::table let mut query = mod_add::table
.inner_join(user_::table.on(mod_add::mod_user_id.eq(user_::id))) .inner_join(user_::table.on(mod_add::mod_user_id.eq(user_::id)))
.inner_join(user_alias_1::table.on(mod_add::other_user_id.eq(user_::id))) .inner_join(user_alias_1::table.on(mod_add::other_user_id.eq(user_alias_1::id)))
.select(( .select((
mod_add::all_columns, mod_add::all_columns,
User_::safe_columns_tuple(), User_::safe_columns_tuple(),

View file

@ -31,7 +31,9 @@ impl ModBanFromCommunityView {
let mut query = mod_ban_from_community::table let mut query = mod_ban_from_community::table
.inner_join(user_::table.on(mod_ban_from_community::mod_user_id.eq(user_::id))) .inner_join(user_::table.on(mod_ban_from_community::mod_user_id.eq(user_::id)))
.inner_join(community::table) .inner_join(community::table)
.inner_join(user_alias_1::table.on(mod_ban_from_community::other_user_id.eq(user_::id))) .inner_join(
user_alias_1::table.on(mod_ban_from_community::other_user_id.eq(user_alias_1::id)),
)
.select(( .select((
mod_ban_from_community::all_columns, mod_ban_from_community::all_columns,
User_::safe_columns_tuple(), User_::safe_columns_tuple(),

View file

@ -27,7 +27,7 @@ impl ModBanView {
) -> Result<Vec<Self>, Error> { ) -> Result<Vec<Self>, Error> {
let mut query = mod_ban::table let mut query = mod_ban::table
.inner_join(user_::table.on(mod_ban::mod_user_id.eq(user_::id))) .inner_join(user_::table.on(mod_ban::mod_user_id.eq(user_::id)))
.inner_join(user_alias_1::table.on(mod_ban::other_user_id.eq(user_::id))) .inner_join(user_alias_1::table.on(mod_ban::other_user_id.eq(user_alias_1::id)))
.select(( .select((
mod_ban::all_columns, mod_ban::all_columns,
User_::safe_columns_tuple(), User_::safe_columns_tuple(),