src/lib/modules/connection/repository.js
/**
   * Find a connection by id
   * @param {string} id - Id of the connection to find
   */
Find a connection by id
@param {string} id - Id of the connection to find
Find a connection by id @param { string } id - Id of the connection to find
findById(id) {
    let _this = this;
    return new Promise((resolve, reject) => {
      if (!id) return reject(new errors.InvalidArugmentError('id is required'));
      return _this.list()
        .then((connections) => {
          return findConnectionById(id, connections);
        })
        .then(resolve)
        .catch(reject);
    });
  }
findById ( id ) { let _this = this ; return new Promise ( ( resolve , reject ) => { if ( ! id ) return reject ( new errors . InvalidArugmentError ( 'id is required' ) ) ; return _this . list ( ) . then ( ( connections ) => { return findConnectionById ( id , connections ) ; } ) . then ( resolve ) . catch ( reject ) ; } ) ; }
Find a connection by id
 @param {string} id - Id of the connection to find
Find a connection by id @param { string } id - Id of the connection to find