From 9bd411c15159609803c4e8c3e352a9db32ea527c Mon Sep 17 00:00:00 2001 From: dan Date: Tue, 28 May 2024 16:37:51 +0100 Subject: Replace getAgent() with reading agent (#4243) * Replace getAgent() with agent * Replace {agent} with agent --- src/lib/api/feed/author.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lib/api/feed/author.ts') diff --git a/src/lib/api/feed/author.ts b/src/lib/api/feed/author.ts index 85601d068..56eff1881 100644 --- a/src/lib/api/feed/author.ts +++ b/src/lib/api/feed/author.ts @@ -7,22 +7,22 @@ import { import {FeedAPI, FeedAPIResponse} from './types' export class AuthorFeedAPI implements FeedAPI { - getAgent: () => BskyAgent + agent: BskyAgent params: GetAuthorFeed.QueryParams constructor({ - getAgent, + agent, feedParams, }: { - getAgent: () => BskyAgent + agent: BskyAgent feedParams: GetAuthorFeed.QueryParams }) { - this.getAgent = getAgent + this.agent = agent this.params = feedParams } async peekLatest(): Promise { - const res = await this.getAgent().getAuthorFeed({ + const res = await this.agent.getAuthorFeed({ ...this.params, limit: 1, }) @@ -36,7 +36,7 @@ export class AuthorFeedAPI implements FeedAPI { cursor: string | undefined limit: number }): Promise { - const res = await this.getAgent().getAuthorFeed({ + const res = await this.agent.getAuthorFeed({ ...this.params, cursor, limit, -- cgit 1.4.1