From 533ffbda1392b133aee59aaeff93c8244ae5ac93 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Fri, 24 Jul 2020 10:56:45 -0700 Subject: [PATCH] Removed disconnect call. --- lib/db.js | 14 +++++--------- package.json | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/db.js b/lib/db.js index 8649b788..6c107edb 100644 --- a/lib/db.js +++ b/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) { diff --git a/package.json b/package.json index bd27cbdd..ad3280a3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "umami", - "version": "0.1.0", + "version": "0.2.0", "description": "Deliciously simple website stats", "author": "Mike Cao ", "license": "MIT",