mirror of
https://github.com/kremalicious/umami.git
synced 2024-06-30 13:41:50 +02:00
delete website in relational query
This commit is contained in:
parent
d60ad1c782
commit
5da7a208a8
|
@ -97,9 +97,7 @@ export async function deleteWebsite(websiteId: string) {
|
|||
});
|
||||
}
|
||||
|
||||
async function deleteWebsiteRelationalQuery(
|
||||
websiteId,
|
||||
): Promise<[Prisma.BatchPayload, Prisma.BatchPayload, Website]> {
|
||||
async function deleteWebsiteRelationalQuery(websiteId,): Promise<[Prisma.BatchPayload, Prisma.BatchPayload, Website]> {
|
||||
const { client, transaction } = prisma;
|
||||
|
||||
return transaction([
|
||||
|
@ -109,10 +107,7 @@ async function deleteWebsiteRelationalQuery(
|
|||
client.session.deleteMany({
|
||||
where: { websiteId },
|
||||
}),
|
||||
client.website.update({
|
||||
data: {
|
||||
isDeleted: true,
|
||||
},
|
||||
client.website.delete({
|
||||
where: { id: websiteId },
|
||||
}),
|
||||
]).then(async data => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user