retrieveHash(user) {
    return this.database.get(this.queries.retrieveHash, user.username)
      .then(row => {
        assert(row, 'The user does not exist.');
        return row.password;
      })
      .catch(err => { console.log(error); throw new Error('Unable to find your user.'); })
  }
/**
  * Retrieve a password from a database.
  * @param {User} user the user you want to retrieve the password
  * @returns {Promise}
  */
Retrieve a password from a database.
@param {User} user the user you want to retrieve the password
@returns {Promise}
Retrieve a password from a database . @param { User } user the user you want to retrieve the password @returns { Promise }
retrieveHash(user) {
    return this.database.get(this.queries.retrieveHash, user.username)
      .then(row => {
        assert(row, 'The user does not exist.');
        return row.password;
      })
      .catch(err => { console.log(error); throw new Error('Unable to find your user.'); })
  }
retrieveHash ( user ) { return this . database . get ( this . queries . retrieveHash , user . username ) . then ( row => { assert ( row , 'The user does not exist.' ) ; return row . password ; } ) . catch ( err => { console . log ( error ) ; throw new Error ( 'Unable to find your user.' ) ; } ) }
Retrieve a password from a database.
Retrieve a password from a database .