Add reset website statistics to settings

This commit is contained in:
Chris Walsh 2021-08-10 14:03:55 -07:00
parent ae7186c32a
commit 6e128b2f38
No known key found for this signature in database
GPG key ID: 28EE0CCA6032019E
5 changed files with 143 additions and 0 deletions

View file

@ -141,6 +141,10 @@ export async function updateWebsite(website_id, data) {
);
}
export async function resetWebsite(website_id) {
return runQuery(prisma.$queryRaw`delete from session where website_id=${website_id}`);
}
export async function deleteWebsite(website_id) {
return runQuery(
/* Prisma bug, does not cascade on non-nullable foreign keys