async deleteForUserId(id) {
    let promises = [];

    try {
      const response = await super.search({query: {userId: id}});
      response.list.forEach(cred => {
        promises.push(this.delete(cred._id));
      });
      return Bluebird.all(promises);
    } catch(e) {
      // dont really care about errors ?
      this.yggdrasil.fire('log', 'warn', e);
      return Bluebird.resolve();
    }
  }
/**
   * delete credentials corresponding to the given user id
   * @param id
   * @return {Promise<T | never>}
   */
delete credentials corresponding to the given user id
@param id
@return {Promise}
delete credentials corresponding to the given user id @param id @return { Promise }
async deleteForUserId(id) {
    let promises = [];
    try {
      const response = await super.search({query: {userId: id}});
      response.list.forEach(cred => {
        promises.push(this.delete(cred._id));
      });
      return Bluebird.all(promises);
    } catch(e) {
      this.yggdrasil.fire('log', 'warn', e);
      return Bluebird.resolve();
    }
  }
async deleteForUserId ( id ) { let promises = [ ] ; try { const response = await super . search ( { query : { userId : id } } ) ; response . list . forEach ( cred => { promises . push ( this . delete ( cred . _id ) ) ; } ) ; return Bluebird . all ( promises ) ; } catch ( e ) { this . yggdrasil . fire ( 'log' , 'warn' , e ) ; return Bluebird . resolve ( ) ; } }
delete credentials corresponding to the given user id
 @param id
 @return {Promise<T | never>}
delete credentials corresponding to the given user id @param id @return { Promise<T | never > }
// dont really care about errors ?