Skip to content

Commit

Permalink
re-enable getPopular
Browse files Browse the repository at this point in the history
  • Loading branch information
dholms committed Sep 22, 2023
1 parent ec422b0 commit 1d89005
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion packages/pds/src/app-view/api/app/bsky/unspecced.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,20 @@ import AppContext from '../../../../context'
export default function (server: Server, ctx: AppContext) {
server.app.bsky.unspecced.getPopular({
auth: ctx.accessVerifier,
handler: async () => {
handler: async ({ auth, params }) => {
const requester = auth.credentials.did
const HOT_CLASSIC_URI =
'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/hot-classic'
const HOT_CLASSIC_DID = 'did:plc:5fllqkujj6kqp5izd5jg7gox'
const res = await ctx.appviewAgent.api.app.bsky.feed.getFeed(
{ feed: HOT_CLASSIC_URI, limit: params.limit, cursor: params.cursor },
await ctx.serviceAuthHeaders(requester, HOT_CLASSIC_DID),
)
return {
encoding: 'application/json',
body: res.data,
}

return {
encoding: 'application/json',
body: { feed: [] },
Expand Down

0 comments on commit 1d89005

Please sign in to comment.