refactor: add apikey check before setup
This commit is contained in:
parent
9905cc7833
commit
6f89d0f2d3
@ -7,10 +7,12 @@ import {
|
|||||||
import { env } from '../utils/env.js';
|
import { env } from '../utils/env.js';
|
||||||
import { prisma } from './_client.js';
|
import { prisma } from './_client.js';
|
||||||
|
|
||||||
lemonSqueezySetup({
|
if (env.billing.lemonSqueezy.apiKey) {
|
||||||
|
lemonSqueezySetup({
|
||||||
apiKey: env.billing.lemonSqueezy.apiKey,
|
apiKey: env.billing.lemonSqueezy.apiKey,
|
||||||
onError: (error) => console.error('Error!', error),
|
onError: (error) => console.error('Error!', error),
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
export type SubscriptionTierType =
|
export type SubscriptionTierType =
|
||||||
keyof typeof env.billing.lemonSqueezy.tierVariantId;
|
keyof typeof env.billing.lemonSqueezy.tierVariantId;
|
||||||
|
Loading…
Reference in New Issue
Block a user