mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-26 20:07:33 -07:00
fix: Promises -> Promise (#8545)
This commit is contained in:
parent
4509fa10b3
commit
0396792209
3 changed files with 3 additions and 3 deletions
|
@ -95,7 +95,7 @@ async function unFollow(follower: User, followee: User) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
await Promises.all([
|
await Promise.all([
|
||||||
Followings.delete(following.id),
|
Followings.delete(following.id),
|
||||||
Users.decrement({ id: follower.id }, 'followingCount', 1),
|
Users.decrement({ id: follower.id }, 'followingCount', 1),
|
||||||
Users.decrement({ id: followee.id }, 'followersCount', 1),
|
Users.decrement({ id: followee.id }, 'followersCount', 1),
|
||||||
|
|
|
@ -67,7 +67,7 @@ export async function insertFollowingDoc(followee: { id: User['id']; host: User[
|
||||||
if (alreadyFollowed) return;
|
if (alreadyFollowed) return;
|
||||||
|
|
||||||
//#region Increment counts
|
//#region Increment counts
|
||||||
await Promises.all([
|
await Promise.all([
|
||||||
Users.increment({ id: follower.id }, 'followingCount', 1),
|
Users.increment({ id: follower.id }, 'followingCount', 1),
|
||||||
Users.increment({ id: followee.id }, 'followersCount', 1),
|
Users.increment({ id: followee.id }, 'followersCount', 1),
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -59,7 +59,7 @@ export default async function(follower: { id: User['id']; host: User['host']; ur
|
||||||
|
|
||||||
export async function decrementFollowing(follower: { id: User['id']; host: User['host']; }, followee: { id: User['id']; host: User['host']; }) {
|
export async function decrementFollowing(follower: { id: User['id']; host: User['host']; }, followee: { id: User['id']; host: User['host']; }) {
|
||||||
//#region Decrement following / followers counts
|
//#region Decrement following / followers counts
|
||||||
await Promises.all([
|
await Promise.all([
|
||||||
Users.decrement({ id: follower.id }, 'followingCount', 1),
|
Users.decrement({ id: follower.id }, 'followingCount', 1),
|
||||||
Users.decrement({ id: followee.id }, 'followersCount', 1),
|
Users.decrement({ id: followee.id }, 'followersCount', 1),
|
||||||
]);
|
]);
|
||||||
|
|
Loading…
Reference in a new issue