From 95bcfd8ef3274f06e7a0f9e5e5062769c93d079b Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Sun, 29 Oct 2023 02:23:43 +0200 Subject: [PATCH] fix: followers and following not being able to load --- packages/backend/src/server/api/mastodon/endpoints/account.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/server/api/mastodon/endpoints/account.ts b/packages/backend/src/server/api/mastodon/endpoints/account.ts index a1f3773fd..39da0e4a5 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/account.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/account.ts @@ -112,7 +112,7 @@ export class ApiAccountMastodon { (this.request.params as any).id, limitToInt(this.request.query as any), ); - return data.data.map((account) => this.mastoconverter.convertAccount(account)); + return await Promise.all(data.data.map(async (account) => await this.mastoconverter.convertAccount(account))); } catch (e: any) { console.error(e); console.error(e.response.data); @@ -126,7 +126,7 @@ export class ApiAccountMastodon { (this.request.params as any).id, limitToInt(this.request.query as any), ); - return data.data.map((account) => this.mastoconverter.convertAccount(account)); + return await Promise.all(data.data.map(async (account) => await this.mastoconverter.convertAccount(account))); } catch (e: any) { console.error(e); console.error(e.response.data);