diff --git a/src/modules/atproto/infrastructure/services/ATProtoAgentService.ts b/src/modules/atproto/infrastructure/services/ATProtoAgentService.ts index eb0728d4..36415caf 100644 --- a/src/modules/atproto/infrastructure/services/ATProtoAgentService.ts +++ b/src/modules/atproto/infrastructure/services/ATProtoAgentService.ts @@ -109,7 +109,7 @@ export class ATProtoAgentService implements IAgentService { async getAuthenticatedServiceAccountAgent(): Promise> { try { const serviceAccount = this.configService.getAtProtoServiceAccount(); - + if (!serviceAccount.identifier || !serviceAccount.appPassword) { return err( new AuthenticationError( @@ -121,7 +121,7 @@ export class ATProtoAgentService implements IAgentService { // First try to get existing session using the service account identifier as DID // We need to convert the identifier to a DID format for session lookup let serviceAccountDid: string; - + // If identifier is already a DID, use it directly if (serviceAccount.identifier.startsWith('did:')) { serviceAccountDid = serviceAccount.identifier; @@ -133,7 +133,8 @@ export class ATProtoAgentService implements IAgentService { // Try to get existing session first (only if we have a proper DID) if (serviceAccountDid.startsWith('did:')) { - const existingSessionResult = await this.appPasswordSessionService.getSession(serviceAccountDid); + const existingSessionResult = + await this.appPasswordSessionService.getSession(serviceAccountDid); if (existingSessionResult.isOk()) { const session = existingSessionResult.value; const agent = new AtpAgent({ @@ -145,10 +146,11 @@ export class ATProtoAgentService implements IAgentService { } // If no existing session or session failed, create a new one - const newSessionResult = await this.appPasswordSessionService.createSession( - serviceAccount.identifier, - serviceAccount.appPassword, - ); + const newSessionResult = + await this.appPasswordSessionService.createSession( + serviceAccount.identifier, + serviceAccount.appPassword, + ); if (newSessionResult.isErr()) { return err( diff --git a/src/modules/atproto/infrastructure/services/FakeAgentService.ts b/src/modules/atproto/infrastructure/services/FakeAgentService.ts index 74c66ea1..e0904a2f 100644 --- a/src/modules/atproto/infrastructure/services/FakeAgentService.ts +++ b/src/modules/atproto/infrastructure/services/FakeAgentService.ts @@ -52,8 +52,10 @@ export class FakeAgentService implements IAgentService { async getAuthenticatedServiceAccountAgent(): Promise> { try { - const serviceAccountIdentifier = process.env.BSKY_SERVICE_ACCOUNT_IDENTIFIER; - const serviceAccountAppPassword = process.env.BSKY_SERVICE_ACCOUNT_APP_PASSWORD; + const serviceAccountIdentifier = + process.env.BSKY_SERVICE_ACCOUNT_IDENTIFIER; + const serviceAccountAppPassword = + process.env.BSKY_SERVICE_ACCOUNT_APP_PASSWORD; if (!serviceAccountIdentifier || !serviceAccountAppPassword) { return err( diff --git a/src/modules/search/infrastructure/http/controllers/SearchBskyPostsForUrlController.ts b/src/modules/search/infrastructure/http/controllers/SearchBskyPostsForUrlController.ts index 3a679e8a..707bc84f 100644 --- a/src/modules/search/infrastructure/http/controllers/SearchBskyPostsForUrlController.ts +++ b/src/modules/search/infrastructure/http/controllers/SearchBskyPostsForUrlController.ts @@ -4,7 +4,9 @@ import { SearchBskyPostsForUrlUseCase } from '../../../application/use-cases/Sea import { AuthenticatedRequest } from '../../../../../shared/infrastructure/http/middleware/AuthMiddleware'; export class SearchBskyPostsForUrlController extends Controller { - constructor(private searchBskyPostsForUrlUseCase: SearchBskyPostsForUrlUseCase) { + constructor( + private searchBskyPostsForUrlUseCase: SearchBskyPostsForUrlUseCase, + ) { super(); } diff --git a/src/shared/infrastructure/http/factories/ServiceFactory.ts b/src/shared/infrastructure/http/factories/ServiceFactory.ts index bbe7cc07..c411f7cf 100644 --- a/src/shared/infrastructure/http/factories/ServiceFactory.ts +++ b/src/shared/infrastructure/http/factories/ServiceFactory.ts @@ -257,7 +257,11 @@ export class ServiceFactory { // ATProto Agent Service const atProtoAgentService = useMockAuth ? new FakeAgentService() - : new ATProtoAgentService(nodeOauthClient, appPasswordSessionService, configService); + : new ATProtoAgentService( + nodeOauthClient, + appPasswordSessionService, + configService, + ); // Create individual metadata services const baseIframelyService = new IFramelyMetadataService( diff --git a/src/webapp/api-client/clients/QueryClient.ts b/src/webapp/api-client/clients/QueryClient.ts index b1e0a897..46342b0d 100644 --- a/src/webapp/api-client/clients/QueryClient.ts +++ b/src/webapp/api-client/clients/QueryClient.ts @@ -260,7 +260,7 @@ export class QueryClient extends BaseClient { if (params.domain) searchParams.set('domain', params.domain); if (params.url) searchParams.set('url', params.url); if (params.tag) { - params.tag.forEach(t => searchParams.append('tag', t)); + params.tag.forEach((t) => searchParams.append('tag', t)); } if (params.limit) searchParams.set('limit', params.limit.toString()); if (params.cursor) searchParams.set('cursor', params.cursor);