diff options
| author | Hazelnoot <acomputerdog@gmail.com> | 2025-05-06 21:15:56 -0400 |
|---|---|---|
| committer | Hazelnoot <acomputerdog@gmail.com> | 2025-05-08 11:23:20 -0400 |
| commit | 2c5fb36e7f07fde634bcc91f6489c0c5b4885fcd (patch) | |
| tree | 28f08f8e4fe934508d89f0062aaa74fbad0fcd9d /packages/backend/src/server/api/mastodon/endpoints/notifications.ts | |
| parent | more fixes to Mastodon logging (diff) | |
| download | sharkey-2c5fb36e7f07fde634bcc91f6489c0c5b4885fcd.tar.gz sharkey-2c5fb36e7f07fde634bcc91f6489c0c5b4885fcd.tar.bz2 sharkey-2c5fb36e7f07fde634bcc91f6489c0c5b4885fcd.zip | |
add missing "return reply" calls to async fastify routes
Required, according to docs: https://fastify.dev/docs/latest/Reference/Routes/#async-await
Diffstat (limited to 'packages/backend/src/server/api/mastodon/endpoints/notifications.ts')
| -rw-r--r-- | packages/backend/src/server/api/mastodon/endpoints/notifications.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/backend/src/server/api/mastodon/endpoints/notifications.ts b/packages/backend/src/server/api/mastodon/endpoints/notifications.ts index 75512c2efc..f6cc59e782 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/notifications.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/notifications.ts @@ -45,7 +45,7 @@ export class ApiNotificationsMastodon { } attachMinMaxPagination(request, reply, response); - reply.send(response); + return reply.send(response); }); fastify.get<ApiNotifyMastodonRoute & { Params: { id?: string } }>('/v1/notification/:id', async (_request, reply) => { @@ -62,7 +62,7 @@ export class ApiNotificationsMastodon { }); } - reply.send(response); + return reply.send(response); }); fastify.post<ApiNotifyMastodonRoute & { Params: { id?: string } }>('/v1/notification/:id/dismiss', async (_request, reply) => { @@ -71,14 +71,14 @@ export class ApiNotificationsMastodon { const client = this.clientService.getClient(_request); const data = await client.dismissNotification(_request.params.id); - reply.send(data.data); + return reply.send(data.data); }); fastify.post<ApiNotifyMastodonRoute>('/v1/notifications/clear', async (_request, reply) => { const client = this.clientService.getClient(_request); const data = await client.dismissNotifications(); - reply.send(data.data); + return reply.send(data.data); }); } } |