From 2c5fb36e7f07fde634bcc91f6489c0c5b4885fcd Mon Sep 17 00:00:00 2001 From: Hazelnoot Date: Tue, 6 May 2025 21:15:56 -0400 Subject: add missing "return reply" calls to async fastify routes Required, according to docs: https://fastify.dev/docs/latest/Reference/Routes/#async-await --- packages/backend/src/server/api/mastodon/endpoints/search.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'packages/backend/src/server/api/mastodon/endpoints/search.ts') diff --git a/packages/backend/src/server/api/mastodon/endpoints/search.ts b/packages/backend/src/server/api/mastodon/endpoints/search.ts index 33bfa87e5f..f58f21966c 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/search.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/search.ts @@ -62,7 +62,7 @@ export class ApiSearchMastodon { attachMinMaxPagination(request, reply, response[type]); } - reply.send(response); + return reply.send(response); }); fastify.get('/v2/search', async (request, reply) => { @@ -103,7 +103,7 @@ export class ApiSearchMastodon { // Offset pagination is the only possible option attachOffsetPagination(request, reply, longestResult); - reply.send(response); + return reply.send(response); }); fastify.get('/v1/trends/statuses', async (request, reply) => { @@ -126,7 +126,7 @@ export class ApiSearchMastodon { const response = await Promise.all(data.map(status => this.mastoConverters.convertStatus(status, me))); attachMinMaxPagination(request, reply, response); - reply.send(response); + return reply.send(response); }); fastify.get('/v2/suggestions', async (request, reply) => { @@ -158,7 +158,7 @@ export class ApiSearchMastodon { })); attachOffsetPagination(request, reply, response); - reply.send(response); + return reply.send(response); }); } } -- cgit v1.2.3-freya