summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/mastodon/endpoints/search.ts
diff options
context:
space:
mode:
authorHazelnoot <acomputerdog@gmail.com>2025-05-06 21:15:56 -0400
committerHazelnoot <acomputerdog@gmail.com>2025-05-08 11:23:20 -0400
commit2c5fb36e7f07fde634bcc91f6489c0c5b4885fcd (patch)
tree28f08f8e4fe934508d89f0062aaa74fbad0fcd9d /packages/backend/src/server/api/mastodon/endpoints/search.ts
parentmore fixes to Mastodon logging (diff)
downloadsharkey-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/search.ts')
-rw-r--r--packages/backend/src/server/api/mastodon/endpoints/search.ts8
1 files changed, 4 insertions, 4 deletions
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<ApiSearchMastodonRoute>('/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<ApiSearchMastodonRoute>('/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<ApiSearchMastodonRoute>('/v2/suggestions', async (request, reply) => {
@@ -158,7 +158,7 @@ export class ApiSearchMastodon {
}));
attachOffsetPagination(request, reply, response);
- reply.send(response);
+ return reply.send(response);
});
}
}