Skip to content
Permalink
ef3571f08f
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
35 lines (27 sloc) 813 Bytes
const bcrypt = require('bcrypt-promise')
const sqlite = require('sqlite-async')
const saltRounds = 10
module.exports = class List {
constructor(dbName = ':memory:') {
return (async() => {
this.db = await sqlite.open(dbName)
/*we need this table to store the user track
const sql = 'CREATE TABLE IF NOT EXISTS uploadTrack\
(id INTEGER PRIMARY KEY AUTOINCREMENT, user TEXT, pass TEXT, email TEXT);'
await this.db.run(sql)*/
return this
console.log("Track open")
})()
}
/**
* checks to see if a set of login credentials are valid
* @param {String} username the username to check
* @param {String} password the password to check
* @returns {Boolean} returns true if credentials are valid
*/
async getAll() {
}
async tearDown() {
await this.db.close()
}
}