fix: followers and following not being able to load

This commit is contained in:
Mar0xy 2023-10-29 02:23:43 +02:00
parent 90b666e626
commit 95bcfd8ef3
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828

View file

@ -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);