update: normalize post tips and torrent tips

This commit is contained in:
Roardom
2024-02-22 09:48:30 +00:00
parent 537ad1e831
commit a37f414145
32 changed files with 758 additions and 261 deletions
+1 -1
View File
@@ -435,7 +435,7 @@ class HomeController extends Controller
fn () => Post::query()
->with('user', 'user.group', 'topic:id,name')
->withCount('likes', 'dislikes', 'authorPosts', 'authorTopics')
->withSum('tips', 'cost')
->withSum('tips', 'bon')
->withExists([
'likes' => fn ($query) => $query->where('user_id', '=', auth()->id()),
'dislikes' => fn ($query) => $query->where('user_id', '=', auth()->id()),