🧐 Improve inspectUser script
This commit is contained in:
@ -31,6 +31,7 @@ const inspectUser = async () => {
|
|||||||
id: true,
|
id: true,
|
||||||
name: true,
|
name: true,
|
||||||
plan: true,
|
plan: true,
|
||||||
|
isVerified: true,
|
||||||
members: {
|
members: {
|
||||||
where: {
|
where: {
|
||||||
user: { email: { not: email } },
|
user: { email: { not: email } },
|
||||||
|
@ -5,19 +5,13 @@ import * as p from '@clack/prompts'
|
|||||||
const updateTypebot = async () => {
|
const updateTypebot = async () => {
|
||||||
await promptAndSetEnvironment('production')
|
await promptAndSetEnvironment('production')
|
||||||
|
|
||||||
const prisma = new PrismaClient({
|
const prisma = new PrismaClient()
|
||||||
log: [{ emit: 'event', level: 'query' }, 'info', 'warn', 'error'],
|
|
||||||
})
|
|
||||||
|
|
||||||
prisma.$on('query', (e) => {
|
const typebotId = await p.text({
|
||||||
console.log(e.query)
|
|
||||||
console.log(e.params)
|
|
||||||
console.log(e.duration, 'ms')
|
|
||||||
})
|
|
||||||
|
|
||||||
const typebotId = (await p.text({
|
|
||||||
message: 'Typebot ID?',
|
message: 'Typebot ID?',
|
||||||
})) as string
|
})
|
||||||
|
|
||||||
|
if (!typebotId || p.isCancel(typebotId)) process.exit()
|
||||||
|
|
||||||
const typebot = await prisma.typebot.update({
|
const typebot = await prisma.typebot.update({
|
||||||
where: {
|
where: {
|
||||||
|
Reference in New Issue
Block a user