Closed haseakito closed 10 months ago
Note that when deleting follows
, you have to specify the followerId
and followingId
in the followerId_followingId
. Here is the code snippet.
await prisma.follows.delete({ where: { followerId_followingId: { followerId: param.userId, followingId: session.user.id } } })
Issue
delete
method onFollow
model withuserId
andfollowerId
id
of followers, but want to include other data such asname
,email
, andimage
for exampleFix
Change the
Follow
model as in the suggested database model