upd: convertAccount now fetches info from the DB

This commit is contained in:
Mar0xy 2023-10-29 02:59:36 +01:00
parent 95bcfd8ef3
commit 549bcf70db
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
4 changed files with 59 additions and 29 deletions

View file

@ -305,9 +305,8 @@ export class MastodonApiServerService {
try {
const sharkId = _request.params.id;
const data = await client.getAccount(sharkId);
const profile = await this.userProfilesRepository.findOneBy({ userId: sharkId });
data.data.fields = profile?.fields.map(f => ({ ...f, verified_at: null })) || [];
reply.send(convertAccount(data.data));
const account = await this.mastoConverter.convertAccount(data.data);
reply.send(account);
} catch (e: any) {
/* console.error(e);
console.error(e.response.data); */