mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 09:45:04 +01:00
Rename method to transaction.
This commit is contained in:
parent
f4e0da481e
commit
5f07cecc95
@ -180,7 +180,7 @@ async function rawQuery(query, params = []) {
|
||||
return prisma.$queryRawUnsafe.apply(prisma, [sql, ...params]);
|
||||
}
|
||||
|
||||
async function multiQuery(queries) {
|
||||
async function transaction(queries) {
|
||||
return prisma.$transaction(queries);
|
||||
}
|
||||
|
||||
@ -195,5 +195,5 @@ export default {
|
||||
getFilterQuery,
|
||||
parseFilters,
|
||||
rawQuery,
|
||||
multiQuery,
|
||||
transaction,
|
||||
};
|
||||
|
@ -2,9 +2,9 @@ import prisma from 'lib/prisma';
|
||||
import redis from 'lib/redis';
|
||||
|
||||
export async function deleteWebsite(website_id) {
|
||||
const { client, multiQuery } = prisma;
|
||||
const { client, transaction } = prisma;
|
||||
|
||||
return multiQuery([
|
||||
return transaction([
|
||||
client.pageview.deleteMany({
|
||||
where: { session: { website: { website_id } } },
|
||||
}),
|
||||
|
@ -2,9 +2,9 @@ import prisma from 'lib/prisma';
|
||||
import redis from 'lib/redis';
|
||||
|
||||
export async function resetWebsite(website_id) {
|
||||
const { client, multiQuery } = prisma;
|
||||
const { client, transaction } = prisma;
|
||||
|
||||
return multiQuery([
|
||||
return transaction([
|
||||
client.pageview.deleteMany({
|
||||
where: { session: { website: { website_id } } },
|
||||
}),
|
||||
|
Loading…
Reference in New Issue
Block a user