summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/mastodon/endpoints/status.ts
diff options
context:
space:
mode:
authorHazelnoot <acomputerdog@gmail.com>2025-04-30 11:13:46 -0400
committerHazelnoot <acomputerdog@gmail.com>2025-04-30 11:13:46 -0400
commit6e4e4fdc3335958f6eb8f35afc3e3f114fe463b8 (patch)
treeb05e5ceced12b5545f0c687d9afeac91646f211d /packages/backend/src/server/api/mastodon/endpoints/status.ts
parentfix type errors in SponsorsService.ts (diff)
downloadsharkey-6e4e4fdc3335958f6eb8f35afc3e3f114fe463b8.tar.gz
sharkey-6e4e4fdc3335958f6eb8f35afc3e3f114fe463b8.tar.bz2
sharkey-6e4e4fdc3335958f6eb8f35afc3e3f114fe463b8.zip
fix type errors in mastodon API
Diffstat (limited to 'packages/backend/src/server/api/mastodon/endpoints/status.ts')
-rw-r--r--packages/backend/src/server/api/mastodon/endpoints/status.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/backend/src/server/api/mastodon/endpoints/status.ts b/packages/backend/src/server/api/mastodon/endpoints/status.ts
index 39c4f44755..ec31e0cc46 100644
--- a/packages/backend/src/server/api/mastodon/endpoints/status.ts
+++ b/packages/backend/src/server/api/mastodon/endpoints/status.ts
@@ -55,8 +55,8 @@ export class ApiStatusMastodon {
const { client, me } = await this.clientService.getAuthClient(_request);
const { data } = await client.getStatusContext(_request.params.id, parseTimelineArgs(_request.query));
- const ancestors = await Promise.all(data.ancestors.map(async status => await this.mastoConverters.convertStatus(status, me)));
- const descendants = await Promise.all(data.descendants.map(async status => await this.mastoConverters.convertStatus(status, me)));
+ const ancestors = await Promise.all(data.ancestors.map(async (status: Entity.Status) => await this.mastoConverters.convertStatus(status, me)));
+ const descendants = await Promise.all(data.descendants.map(async (status: Entity.Status) => await this.mastoConverters.convertStatus(status, me)));
const response = { ancestors, descendants };
reply.send(response);
@@ -166,7 +166,7 @@ export class ApiStatusMastodon {
if (body.in_reply_to_id && removed === '/unreact') {
const id = body.in_reply_to_id;
const post = await client.getStatus(id);
- const react = post.data.emoji_reactions.filter(e => e.me)[0].name;
+ const react = post.data.emoji_reactions.filter((e: Entity.Emoji) => e.me)[0].name;
const data = await client.deleteEmojiReaction(id, react);
reply.send(data.data);
}