From 354b8333751b8fcca7c06e23839311c3976bcf56 Mon Sep 17 00:00:00 2001 From: KevinMidboe Date: Tue, 6 Mar 2018 21:24:18 +0100 Subject: [PATCH] Removed console log of table data. --- seasoned_api/src/database/sqliteDatabase.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/seasoned_api/src/database/sqliteDatabase.js b/seasoned_api/src/database/sqliteDatabase.js index 7b346a6..10c2262 100644 --- a/seasoned_api/src/database/sqliteDatabase.js +++ b/seasoned_api/src/database/sqliteDatabase.js @@ -14,12 +14,10 @@ class SqliteDatabase { * Connect to the database. * @returns {Promise} succeeds if connection was established */ - async connect() { - return Promise.resolve() - .then(() => { - this.connection = new sqlite3.Database(this.host); - this.connection.run('PRAGMA foreign_keys=on') - }); + connect() { + let database = new sqlite3.Database(this.host); + this.connection = database; + return database; } /** @@ -67,7 +65,6 @@ class SqliteDatabase { if (err) { reject(err); } - console.log('rows', rows) resolve(rows); }) })