chore: lint

This commit is contained in:
Mar0xy 2023-10-30 01:47:24 +01:00
parent 81def9457b
commit e24a57402b
No known key found for this signature in database
GPG Key ID: 56569BBE47D2C828
1 changed files with 4 additions and 1 deletions

View File

@ -292,7 +292,9 @@ export class MastodonApiServerService {
}
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
if ((_request.body as any).fields_attributes) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const fields = (_request.body as any).fields_attributes.map((field: any) => {
if (!(field.name.trim() === '' && field.value.trim() === '')) {
if (field.name.trim() === '') return reply.code(400).send('Field name can not be empty');
@ -302,9 +304,10 @@ export class MastodonApiServerService {
...field,
};
});
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(_request.body as any).fields_attributes = fields.filter((field: any) => field.name.trim().length > 0 && field.value.length > 0);
}
const data = await client.updateCredentials(_request.body!);
reply.send(await this.mastoConverter.convertAccount(data.data));
} catch (e: any) {