🛂 Add setCustomPlan script
This commit is contained in:
@@ -1,23 +1,22 @@
|
||||
import { PrismaClient } from 'db'
|
||||
import path from 'path'
|
||||
import { setCustomPlan } from './setCustomPlan'
|
||||
|
||||
require('dotenv').config({
|
||||
path: path.join(
|
||||
__dirname,
|
||||
process.env.NODE_ENV === 'staging' ? '.env.staging' : '.env.local'
|
||||
process.env.NODE_ENV === 'production'
|
||||
? '.env.production'
|
||||
: process.env.NODE_ENV === 'staging'
|
||||
? '.env.staging'
|
||||
: '.env.local'
|
||||
),
|
||||
})
|
||||
|
||||
const prisma = new PrismaClient({ log: ['query', 'info', 'warn', 'error'] })
|
||||
|
||||
const main = async () => {
|
||||
const workspaces = await prisma.workspace.findMany({
|
||||
where: {
|
||||
members: { some: { userId: 'coucou' } },
|
||||
},
|
||||
})
|
||||
|
||||
console.log(workspaces)
|
||||
setCustomPlan()
|
||||
}
|
||||
|
||||
main().then()
|
||||
|
||||
Reference in New Issue
Block a user