about summary refs log tree commit diff
path: root/src/lib/api/feed/list.ts
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2024-05-28 16:37:51 +0100
committerGitHub <noreply@github.com>2024-05-28 16:37:51 +0100
commit9bd411c15159609803c4e8c3e352a9db32ea527c (patch)
tree31305e290bd4597aa6ab441ecc556999b19ad693 /src/lib/api/feed/list.ts
parent8a2f43c218c464e6165f331e482b6094b87eefc7 (diff)
downloadvoidsky-9bd411c15159609803c4e8c3e352a9db32ea527c.tar.zst
Replace getAgent() with reading agent (#4243)
* Replace getAgent() with agent

* Replace {agent} with agent
Diffstat (limited to 'src/lib/api/feed/list.ts')
-rw-r--r--src/lib/api/feed/list.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/api/feed/list.ts b/src/lib/api/feed/list.ts
index 004685b99..9744e3d4c 100644
--- a/src/lib/api/feed/list.ts
+++ b/src/lib/api/feed/list.ts
@@ -7,22 +7,22 @@ import {
 import {FeedAPI, FeedAPIResponse} from './types'
 
 export class ListFeedAPI implements FeedAPI {
-  getAgent: () => BskyAgent
+  agent: BskyAgent
   params: GetListFeed.QueryParams
 
   constructor({
-    getAgent,
+    agent,
     feedParams,
   }: {
-    getAgent: () => BskyAgent
+    agent: BskyAgent
     feedParams: GetListFeed.QueryParams
   }) {
-    this.getAgent = getAgent
+    this.agent = agent
     this.params = feedParams
   }
 
   async peekLatest(): Promise<AppBskyFeedDefs.FeedViewPost> {
-    const res = await this.getAgent().app.bsky.feed.getListFeed({
+    const res = await this.agent.app.bsky.feed.getListFeed({
       ...this.params,
       limit: 1,
     })
@@ -36,7 +36,7 @@ export class ListFeedAPI implements FeedAPI {
     cursor: string | undefined
     limit: number
   }): Promise<FeedAPIResponse> {
-    const res = await this.getAgent().app.bsky.feed.getListFeed({
+    const res = await this.agent.app.bsky.feed.getListFeed({
       ...this.params,
       cursor,
       limit,