Skip to content

Commit

Permalink
missed one
Browse files Browse the repository at this point in the history
  • Loading branch information
dholms committed Dec 7, 2023
1 parent a99f28f commit f3d5c82
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions packages/bsky/src/data-plane/server/routes/threads.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { ServiceImpl } from '@connectrpc/connect'
import { Service } from '../../gen/bsky_connect'
import * as ui8 from 'uint8arrays'
import { Database } from '../../../db'
import { keyBy } from '@atproto/common'
import {
getAncestorsAndSelfQb,
getDescendentsQb,
Expand Down Expand Up @@ -33,22 +31,4 @@ export default (db: Database): Partial<ServiceImpl<typeof Service>> => ({
]
return { uris }
},

async getThreadgates(req) {
if (req.uris.length === 0) {
return { records: [] }
}
const res = await db.db
.selectFrom('record')
.selectAll()
.where('uri', 'in', req.uris)
.execute()
const byUri = keyBy(res, 'uri')
const records = req.uris.map((uri) => {
const row = byUri[uri]
const json = row ? row.json : JSON.stringify(null)
return ui8.fromString(json, 'utf8')
})
return { records }
},
})

0 comments on commit f3d5c82

Please sign in to comment.