mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-06-28 14:44:15 +00:00
fix: remove likes property in mii model
This commit is contained in:
parent
2fdf120280
commit
8f731dd358
5 changed files with 28 additions and 30 deletions
|
|
@ -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
|
||||
}));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue