diff --git a/packages/bsky/src/data-plane/server/routes/subscription-entitlements.ts b/packages/bsky/src/data-plane/server/routes/subscription-entitlements.ts index 8f3bf97b93f..be451c95fda 100644 --- a/packages/bsky/src/data-plane/server/routes/subscription-entitlements.ts +++ b/packages/bsky/src/data-plane/server/routes/subscription-entitlements.ts @@ -3,6 +3,18 @@ import { Service } from '../../../proto/bsky_connect' import { Database } from '../db' export default (db: Database): Partial> => ({ + 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