Skip to content

Commit

Permalink
implement dataplane.getSubscriptionEntitlement
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelbsky committed Dec 1, 2024
1 parent 6be9e64 commit a2b02ef
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ import { Service } from '../../../proto/bsky_connect'
import { Database } from '../db'

export default (db: Database): Partial<ServiceImpl<typeof Service>> => ({
async getSubscriptionEntitlement(req) {
const { dids } = req

return {
subscriptionEntitlements: await db.db
.selectFrom('subscription_entitlement')
.selectAll()
.where('did', 'in', dids ?? [])
.execute(),
}
},

async setSubscriptionEntitlement(req) {
const { subscriptionEntitlement } = req

Expand Down

0 comments on commit a2b02ef

Please sign in to comment.