support Mastodon v4 "link header" pagination

This commit is contained in:
Hazelnoot 2025-03-22 14:19:32 -04:00
parent 3d8930f070
commit fc1d0c958c
6 changed files with 323 additions and 84 deletions

View file

@ -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}`;
}
/**