mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 00:43:49 +01:00
[backend] Fix UserListJoining delete query on unfollow
This commit is contained in:
parent
c7dc059116
commit
10865168bf
@ -45,7 +45,10 @@ export default async function (
|
||||
return;
|
||||
}
|
||||
|
||||
await UserListJoinings.delete({ userId: followee.id, userList: { userId: follower.id } });
|
||||
const ids = await UserListJoinings.find({ where: { userId: followee.id, userList: { userId: follower.id } }, select: ["id"] })
|
||||
.then(p => p.map(x => x.id));
|
||||
|
||||
if (ids.length > 0) await UserListJoinings.delete(ids);
|
||||
await Followings.delete(following.id);
|
||||
|
||||
decrementFollowing(follower, followee);
|
||||
|
Loading…
Reference in New Issue
Block a user