♻️ (billing) Refactor billing server code to trpc
This commit is contained in:
18
apps/builder/src/features/billing/api/router.ts
Normal file
18
apps/builder/src/features/billing/api/router.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { router } from '@/utils/server/trpc'
|
||||
import { getBillingPortalUrl } from './procedures/getBillingPortalUrl'
|
||||
import { listInvoices } from './procedures/listInvoices'
|
||||
import { cancelSubscription } from './procedures/cancelSubscription'
|
||||
import { createCheckoutSession } from './procedures/createCheckoutSession'
|
||||
import { updateSubscription } from './procedures/updateSubscription'
|
||||
import { getSubscription } from './procedures/getSubscription'
|
||||
import { getUsage } from './procedures/getUsage'
|
||||
|
||||
export const billingRouter = router({
|
||||
getBillingPortalUrl,
|
||||
listInvoices,
|
||||
cancelSubscription,
|
||||
createCheckoutSession,
|
||||
updateSubscription,
|
||||
getSubscription,
|
||||
getUsage,
|
||||
})
|
||||
Reference in New Issue
Block a user