A self hosted solution for privately rating and reviewing different sorts of media
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: use UserActivity for activity history not UserEntry

+5 -7
+5 -7
app/(app)/users/[username]/_components/activityHistory.tsx
··· 15 15 count: bigint; 16 16 }[] = await prisma.$queryRawUnsafe(` 17 17 SELECT 18 - DATE(watchedAt) as date, 18 + DATE(createdAt) as date, 19 19 COUNT(*) as count 20 - FROM UserEntry 20 + FROM UserActivity 21 21 WHERE 22 22 userId = '${profileUser.id}' 23 - AND status = 'completed' 24 - AND watchedAt IS NOT NULL 25 - AND watchedAt >= CURDATE() - INTERVAL 200 DAY 26 - GROUP BY DATE(watchedAt) 23 + AND createdAt >= CURDATE() - INTERVAL 200 DAY 24 + GROUP BY DATE(createdAt) 27 25 ORDER BY date ASC; 28 26 `); 29 27 ··· 42 40 43 41 return ( 44 42 <div className="flex flex-col gap-4"> 45 - <div className="font-dm-serif flex w-full justify-between border-b border-b-base-200 pb-2 text-3xl font-semibold"> 43 + <div className="flex w-full justify-between border-b border-b-base-200 pb-2 font-dm-serif text-3xl font-semibold"> 46 44 Activity History 47 45 </div> 48 46