Updates for cloud mode.
This commit is contained in:
@@ -117,7 +117,7 @@ export async function deleteTeam(
|
||||
teamId: string,
|
||||
): Promise<Promise<[Prisma.BatchPayload, Prisma.BatchPayload, Team]>> {
|
||||
const { client, transaction } = prisma;
|
||||
const cloudMode = process.env.CLOUD_MODE;
|
||||
const cloudMode = !!process.env.CLOUD_URL;
|
||||
|
||||
if (cloudMode) {
|
||||
return transaction([
|
||||
|
||||
@@ -122,7 +122,7 @@ export async function deleteUser(
|
||||
]
|
||||
> {
|
||||
const { client, transaction } = prisma;
|
||||
const cloudMode = process.env.CLOUD_MODE;
|
||||
const cloudMode = !!process.env.CLOUD_URL;
|
||||
|
||||
const websites = await client.website.findMany({
|
||||
where: { userId },
|
||||
|
||||
@@ -159,7 +159,7 @@ export async function resetWebsite(
|
||||
websiteId: string,
|
||||
): Promise<[Prisma.BatchPayload, Prisma.BatchPayload, Website]> {
|
||||
const { client, transaction } = prisma;
|
||||
const cloudMode = !!process.env.cloudMode;
|
||||
const cloudMode = !!process.env.CLOUD_URL;
|
||||
|
||||
return transaction([
|
||||
client.eventData.deleteMany({
|
||||
@@ -193,7 +193,7 @@ export async function deleteWebsite(
|
||||
websiteId: string,
|
||||
): Promise<[Prisma.BatchPayload, Prisma.BatchPayload, Website]> {
|
||||
const { client, transaction } = prisma;
|
||||
const cloudMode = !!process.env.CLOUD_MODE;
|
||||
const cloudMode = !!process.env.CLOUD_URL;
|
||||
|
||||
return transaction([
|
||||
client.eventData.deleteMany({
|
||||
|
||||
Reference in New Issue
Block a user