diff options
| author | Hazelnoot <acomputerdog@gmail.com> | 2025-03-21 21:45:28 -0400 |
|---|---|---|
| committer | Hazelnoot <acomputerdog@gmail.com> | 2025-03-27 19:51:42 -0400 |
| commit | 75b6c63f4448c4f79bb652d14da2545109eb05b1 (patch) | |
| tree | 3743a75bfffe43929e2c7783a7d303d3d6f5cd72 /packages/backend/src/server/api/mastodon/MastodonClientService.ts | |
| parent | format mastodon API endpoints (diff) | |
| download | sharkey-75b6c63f4448c4f79bb652d14da2545109eb05b1.tar.gz sharkey-75b6c63f4448c4f79bb652d14da2545109eb05b1.tar.bz2 sharkey-75b6c63f4448c4f79bb652d14da2545109eb05b1.zip | |
remove unused megalodon components
Diffstat (limited to 'packages/backend/src/server/api/mastodon/MastodonClientService.ts')
| -rw-r--r-- | packages/backend/src/server/api/mastodon/MastodonClientService.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/backend/src/server/api/mastodon/MastodonClientService.ts b/packages/backend/src/server/api/mastodon/MastodonClientService.ts index 82f9b7bfa9..474aaefb35 100644 --- a/packages/backend/src/server/api/mastodon/MastodonClientService.ts +++ b/packages/backend/src/server/api/mastodon/MastodonClientService.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: AGPL-3.0-only */ -import { megalodon, MegalodonInterface } from 'megalodon'; +import { Misskey } from 'megalodon'; import { Injectable } from '@nestjs/common'; import { MiLocalUser } from '@/models/User.js'; import { AuthenticateService } from '@/server/api/AuthenticateService.js'; @@ -18,7 +18,7 @@ export class MastodonClientService { /** * Gets the authenticated user and API client for a request. */ - public async getAuthClient(request: FastifyRequest, accessToken?: string | null): Promise<{ client: MegalodonInterface, me: MiLocalUser | null }> { + public async getAuthClient(request: FastifyRequest, accessToken?: string | null): Promise<{ client: Misskey, me: MiLocalUser | null }> { const authorization = request.headers.authorization; accessToken = accessToken !== undefined ? accessToken : getAccessToken(authorization); @@ -41,14 +41,14 @@ export class MastodonClientService { /** * Creates an authenticated API client for a request. */ - public getClient(request: FastifyRequest, accessToken?: string | null): MegalodonInterface { + public getClient(request: FastifyRequest, accessToken?: string | null): Misskey { const authorization = request.headers.authorization; accessToken = accessToken !== undefined ? accessToken : getAccessToken(authorization); // TODO pass agent? const baseUrl = this.getBaseUrl(request); const userAgent = request.headers['user-agent']; - return megalodon('misskey', baseUrl, accessToken, userAgent); + return new Misskey(baseUrl, accessToken, userAgent); } /** |