2
0

🛂 Add backup and restore database scripts

This commit is contained in:
Baptiste Arnaud
2022-11-23 11:40:57 +01:00
parent d80cc1b248
commit 3645607ed4
10 changed files with 107 additions and 43 deletions

View File

@ -1,9 +1,10 @@
import { Plan, PrismaClient } from 'db'
import Stripe from 'stripe'
import { promptAndSetEnvironment } from './utils'
const prisma = new PrismaClient()
export const setCustomPlan = async () => {
const setCustomPlan = async () => {
await promptAndSetEnvironment()
const prisma = new PrismaClient()
if (
!process.env.STRIPE_SECRET_KEY ||
!process.env.STRIPE_PRODUCT_ID ||
@ -81,3 +82,5 @@ export const setCustomPlan = async () => {
console.log('Claimable plan updated!')
}
setCustomPlan()