diff options
| author | Hazelnoot <acomputerdog@gmail.com> | 2025-03-22 14:19:32 -0400 |
|---|---|---|
| committer | Hazelnoot <acomputerdog@gmail.com> | 2025-03-27 19:51:43 -0400 |
| commit | fc1d0c958c0fa9eb4a495ef9138d4250f2ba81a0 (patch) | |
| tree | 3a87fd31d62146efcea334549304913927a1977c /packages/backend/src/server/api/mastodon/MastodonClientService.ts | |
| parent | implement /api/v1/favourites (diff) | |
| download | sharkey-fc1d0c958c0fa9eb4a495ef9138d4250f2ba81a0.tar.gz sharkey-fc1d0c958c0fa9eb4a495ef9138d4250f2ba81a0.tar.bz2 sharkey-fc1d0c958c0fa9eb4a495ef9138d4250f2ba81a0.zip | |
support Mastodon v4 "link header" pagination
Diffstat (limited to 'packages/backend/src/server/api/mastodon/MastodonClientService.ts')
| -rw-r--r-- | packages/backend/src/server/api/mastodon/MastodonClientService.ts | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/packages/backend/src/server/api/mastodon/MastodonClientService.ts b/packages/backend/src/server/api/mastodon/MastodonClientService.ts index 474aaefb35..d7b74bb751 100644 --- a/packages/backend/src/server/api/mastodon/MastodonClientService.ts +++ b/packages/backend/src/server/api/mastodon/MastodonClientService.ts @@ -51,12 +51,14 @@ export class MastodonClientService { return new Misskey(baseUrl, accessToken, userAgent); } - /** - * Gets the base URL (origin) of the incoming request - */ - public getBaseUrl(request: FastifyRequest): string { - return `${request.protocol}://${request.host}`; - } + readonly getBaseUrl = getBaseUrl; +} + +/** + * Gets the base URL (origin) of the incoming request + */ +export function getBaseUrl(request: FastifyRequest): string { + return `${request.protocol}://${request.host}`; } /** |