From 876ae8d48ac938e549b37c6a649286c5f22659e0 Mon Sep 17 00:00:00 2001 From: moepoi Date: Mon, 22 Nov 2021 00:07:43 +0700 Subject: [PATCH] Add disconnect function to db --- modules/db.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/db.js b/modules/db.js index 2df463c..10e5871 100644 --- a/modules/db.js +++ b/modules/db.js @@ -13,6 +13,11 @@ function connect() { return connection; } +function disconnect(connection) { + connection.end(); +} + module.exports = { - connect + connect, + disconnect } \ No newline at end of file