♻️ (billing) Refactor billing server code to trpc

This commit is contained in:
Baptiste Arnaud
2023-02-17 16:19:39 +01:00
parent 962438768e
commit b73282d810
38 changed files with 1565 additions and 367 deletions

View 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,
})