refactor: move billing mode inside folder
This commit is contained in:
parent
f0ddf6c5dd
commit
fa1ff3b5f6
@ -4,8 +4,8 @@ import {
|
|||||||
updateSubscription,
|
updateSubscription,
|
||||||
cancelSubscription as lsCancelSubscription,
|
cancelSubscription as lsCancelSubscription,
|
||||||
} from '@lemonsqueezy/lemonsqueezy.js';
|
} from '@lemonsqueezy/lemonsqueezy.js';
|
||||||
import { env } from '../utils/env.js';
|
import { env } from '../../utils/env.js';
|
||||||
import { prisma } from './_client.js';
|
import { prisma } from '../_client.js';
|
||||||
|
|
||||||
if (env.billing.lemonSqueezy.apiKey) {
|
if (env.billing.lemonSqueezy.apiKey) {
|
||||||
lemonSqueezySetup({
|
lemonSqueezySetup({
|
@ -2,7 +2,7 @@ import { Router, raw } from 'express';
|
|||||||
import crypto from 'crypto';
|
import crypto from 'crypto';
|
||||||
import { env } from '../utils/env.js';
|
import { env } from '../utils/env.js';
|
||||||
import { get } from 'lodash-es';
|
import { get } from 'lodash-es';
|
||||||
import { checkIsValidProduct } from '../model/billing.js';
|
import { checkIsValidProduct } from '../model/billing/index.js';
|
||||||
import { prisma } from '../model/_client.js';
|
import { prisma } from '../model/_client.js';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ import {
|
|||||||
createCheckoutBilling,
|
createCheckoutBilling,
|
||||||
getTierNameByvariantId,
|
getTierNameByvariantId,
|
||||||
SubscriptionTierType,
|
SubscriptionTierType,
|
||||||
} from '../../model/billing.js';
|
} from '../../model/billing/index.js';
|
||||||
import { LemonSqueezySubscriptionModelSchema } from '../../prisma/zod/lemonsqueezysubscription.js';
|
import { LemonSqueezySubscriptionModelSchema } from '../../prisma/zod/lemonsqueezysubscription.js';
|
||||||
|
|
||||||
export const billingRouter = router({
|
export const billingRouter = router({
|
||||||
|
Loading…
Reference in New Issue
Block a user