Fix nsfw posts showing for non-logged in users. Fixes #1614

fix/nsfw_logged_in
Dessalines 2021-05-25 20:15:59 -04:00
parent 100a56e8ef
commit be0a34f811
2 changed files with 2 additions and 2 deletions

View File

@ -359,7 +359,7 @@ impl<'a> PostQueryBuilder<'a> {
query = query.filter(post::creator_id.eq(creator_id));
}
if !self.show_nsfw.unwrap_or(true) {
if !self.show_nsfw.unwrap_or(false) {
query = query
.filter(post::nsfw.eq(false))
.filter(community::nsfw.eq(false));

View File

@ -198,7 +198,7 @@ impl<'a> CommunityQueryBuilder<'a> {
}
};
if !self.show_nsfw.unwrap_or(true) {
if !self.show_nsfw.unwrap_or(false) {
query = query.filter(community::nsfw.eq(false));
};