Updated prisma and added disconnect.

This commit is contained in:
Mike Cao 2020-09-29 21:39:51 -07:00
parent ce2ca57aba
commit e64b35f701
3 changed files with 23 additions and 19 deletions

View file

@ -16,9 +16,13 @@ export function getDatabase() {
}
export async function runQuery(query) {
return query.catch(e => {
throw e;
});
return query
.catch(e => {
throw e;
})
.finally(async () => {
await prisma.$disconnect();
});
}
export async function rawQuery(query, params) {