fix: remove likes property in mii model

This commit is contained in:
trafficlunar 2025-03-31 20:20:16 +01:00
parent 2fdf120280
commit 8f731dd358
5 changed files with 28 additions and 30 deletions

View file

@ -75,11 +75,15 @@ export default async function MiiList({ searchParams, userId }: Props) {
userId: true,
},
},
_count: {
select: { likedBy: true },
},
},
});
const formattedMiis = miis.map((mii) => ({
...mii,
likes: mii._count.likedBy,
isLikedByUser: mii.likedBy.length > 0, // True if the user has liked the Mii
}));