From b9e326719876345446d4e84d6de51e64c6e9925f Mon Sep 17 00:00:00 2001 From: Johann150 Date: Mon, 25 Apr 2022 08:14:13 +0200 Subject: [PATCH] fix: Promises -> Promise (#8545) --- packages/backend/src/services/blocking/create.ts | 2 +- packages/backend/src/services/following/create.ts | 2 +- packages/backend/src/services/following/delete.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/services/blocking/create.ts b/packages/backend/src/services/blocking/create.ts index d4b28d8d7..b2be78b22 100644 --- a/packages/backend/src/services/blocking/create.ts +++ b/packages/backend/src/services/blocking/create.ts @@ -95,7 +95,7 @@ async function unFollow(follower: User, followee: User) { return; } - await Promises.all([ + await Promise.all([ Followings.delete(following.id), Users.decrement({ id: follower.id }, 'followingCount', 1), Users.decrement({ id: followee.id }, 'followersCount', 1), diff --git a/packages/backend/src/services/following/create.ts b/packages/backend/src/services/following/create.ts index f521118d4..72c24676b 100644 --- a/packages/backend/src/services/following/create.ts +++ b/packages/backend/src/services/following/create.ts @@ -67,7 +67,7 @@ export async function insertFollowingDoc(followee: { id: User['id']; host: User[ if (alreadyFollowed) return; //#region Increment counts - await Promises.all([ + await Promise.all([ Users.increment({ id: follower.id }, 'followingCount', 1), Users.increment({ id: followee.id }, 'followersCount', 1), ]); diff --git a/packages/backend/src/services/following/delete.ts b/packages/backend/src/services/following/delete.ts index 1e425c268..91b5a3d61 100644 --- a/packages/backend/src/services/following/delete.ts +++ b/packages/backend/src/services/following/delete.ts @@ -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']; }) { //#region Decrement following / followers counts - await Promises.all([ + await Promise.all([ Users.decrement({ id: follower.id }, 'followingCount', 1), Users.decrement({ id: followee.id }, 'followersCount', 1), ]);