Skip to content

Commit

Permalink
fix post thread responses
Browse files Browse the repository at this point in the history
  • Loading branch information
devinivy committed Jan 30, 2024
1 parent abf4d44 commit a2b51fb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/bsky/src/api/app/bsky/feed/getPostThread.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { InvalidRequestError } from '@atproto/xrpc-server'
import { Server } from '../../../../lexicon'
import { isNotFoundPost } from '../../../../lexicon/types/app/bsky/feed/defs'
import { QueryParams } from '../../../../lexicon/types/app/bsky/feed/getPostThread'
import {
QueryParams,
OutputSchema,
} from '../../../../lexicon/types/app/bsky/feed/getPostThread'
import AppContext from '../../../../context'
import { setRepoRev } from '../../../util'
import {
Expand All @@ -27,7 +30,7 @@ export default function (server: Server, ctx: AppContext) {
handler: async ({ params, auth, res }) => {
const { viewer } = ctx.authVerifier.parseCreds(auth)

let result
let result: OutputSchema
try {
result = await getPostThread({ ...params, viewer }, ctx)
} catch (err) {
Expand All @@ -41,7 +44,7 @@ export default function (server: Server, ctx: AppContext) {

return {
encoding: 'application/json',
body: result.value,
body: result,
}
},
})
Expand Down

0 comments on commit a2b51fb

Please sign in to comment.