mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 01:35:17 +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';
|
import { PrismaClient } from '@prisma/client';
|
||||||
|
|
||||||
const prisma = new PrismaClient({
|
export const prisma = new PrismaClient({
|
||||||
log: [process.env.NODE_ENV !== 'production' && 'query'],
|
log: [process.env.NODE_ENV !== 'production' && 'query'],
|
||||||
});
|
});
|
||||||
|
|
||||||
export async function runQuery(query) {
|
export async function runQuery(query) {
|
||||||
return query
|
return query.catch(e => {
|
||||||
.catch(e => {
|
console.error(e);
|
||||||
console.error(e);
|
throw e;
|
||||||
throw e;
|
});
|
||||||
})
|
|
||||||
.finally(async () => {
|
|
||||||
await prisma.disconnect();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getWebsite(website_uuid) {
|
export async function getWebsite(website_uuid) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "umami",
|
"name": "umami",
|
||||||
"version": "0.1.0",
|
"version": "0.2.0",
|
||||||
"description": "Deliciously simple website stats",
|
"description": "Deliciously simple website stats",
|
||||||
"author": "Mike Cao <mike@mikecao.com>",
|
"author": "Mike Cao <mike@mikecao.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
Loading…
Reference in New Issue
Block a user