いいね非公開のユーザーが、チェックイン画面のいいね件数欄に露出する不具合の修正

This commit is contained in:
shibafu 2019-09-15 01:55:17 +09:00
parent bf1c4e7a21
commit 7cb6dd4754

View File

@ -56,6 +56,7 @@ class Ejaculation extends Model
}, },
'likes.user' => function ($query) { 'likes.user' => function ($query) {
$query->where('is_protected', false) $query->where('is_protected', false)
->where('private_likes', false)
->orWhere('id', Auth::id()); ->orWhere('id', Auth::id());
} }
]) ])
@ -72,7 +73,8 @@ class Ejaculation extends Model
$query->latest()->take(10); $query->latest()->take(10);
}, },
'likes.user' => function ($query) { 'likes.user' => function ($query) {
$query->where('is_protected', false); $query->where('is_protected', false)
->where('private_likes', false);
} }
]) ])
->withCount('likes') ->withCount('likes')