mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-14 01:05:02 +01:00
Removed disconnect call.
This commit is contained in:
parent
a6975ecedd
commit
533ffbda13
14
lib/db.js
14
lib/db.js
@ -1,18 +1,14 @@
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
|
||||
const prisma = new PrismaClient({
|
||||
export const prisma = new PrismaClient({
|
||||
log: [process.env.NODE_ENV !== 'production' && 'query'],
|
||||
});
|
||||
|
||||
export async function runQuery(query) {
|
||||
return query
|
||||
.catch(e => {
|
||||
console.error(e);
|
||||
throw e;
|
||||
})
|
||||
.finally(async () => {
|
||||
await prisma.disconnect();
|
||||
});
|
||||
return query.catch(e => {
|
||||
console.error(e);
|
||||
throw e;
|
||||
});
|
||||
}
|
||||
|
||||
export async function getWebsite(website_uuid) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "umami",
|
||||
"version": "0.1.0",
|
||||
"version": "0.2.0",
|
||||
"description": "Deliciously simple website stats",
|
||||
"author": "Mike Cao <mike@mikecao.com>",
|
||||
"license": "MIT",
|
||||
|
Loading…
Reference in New Issue
Block a user