Api request #84

Merged
KevinMidboe merged 39 commits from api_request into master 2018-03-19 14:46:19 +00:00
Showing only changes of commit 354b833375 - Show all commits

View File

@@ -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);
})
})