server/api/services/endorser.db.service.js
/**
     Similar to jwtsByParamsPaged, but:
     - it returns an array of the results
     - it works in reverse-chronological order
   **/
Similar to jwtsByParamsPaged, but:
it returns an array of the results
it works in reverse-chronological order
Similar to jwtsByParamsPaged but : it returns an array of the results it works in reverse - chronological order
jwtsByParams(params) {
    let claimContents = params.claimContents
    delete params.claimContents 
    let excludeConfirmations = params.excludeConfirmations
    delete params.excludeConfirmations
    let where = constructWhere(params, claimContents, excludeConfirmations)
    return new Promise((resolve, reject) => {
      var data = []
      db.each("SELECT id, issuedAt, issuer, subject, claimContext, claimType, claim, hashHex, hashChainHex FROM jwt" + where.clause + " ORDER BY id DESC LIMIT " + DEFAULT_LIMIT, where.params, function(err, row) {
        row.issuedAt = isoAndZonify(row.issuedAt)
        data.push({id:row.id, issuedAt:row.issuedAt, issuer:row.issuer, subject:row.subject, claimContext:row.claimContext, claimType:row.claimType, claim:row.claim, hashHex:row.hashHex, hashChainHex:row.hashChainHex})
      }, function(err, num) {
        if (err) {
          reject(err)
        } else {
          resolve(data)
        }
      })
    })
  }
jwtsByParams ( params ) { let claimContents = params . claimContents delete params . claimContents let excludeConfirmations = params . excludeConfirmations delete params . excludeConfirmations let where = constructWhere ( params , claimContents , excludeConfirmations ) return new Promise ( ( resolve , reject ) => { var data = [ ] db . each ( "SELECT id, issuedAt, issuer, subject, claimContext, claimType, claim, hashHex, hashChainHex FROM jwt" + where . clause + " ORDER BY id DESC LIMIT " + DEFAULT_LIMIT , where . params , function ( err , row ) { row . issuedAt = isoAndZonify ( row . issuedAt ) data . push ( { id : row . id , issuedAt : row . issuedAt , issuer : row . issuer , subject : row . subject , claimContext : row . claimContext , claimType : row . claimType , claim : row . claim , hashHex : row . hashHex , hashChainHex : row . hashChainHex } ) } , function ( err , num ) { if ( err ) { reject ( err ) } else { resolve ( data ) } } ) } ) }
Similar to jwtsByParamsPaged, but:
 it returns an array of the results
 it works in reverse-chronological order
Similar to jwtsByParamsPaged but : it returns an array of the results it works in reverse - chronological order
// Note: this is very similar logic to jwtsByParamsPaged // note that value of '' is hard to detect (which is why this isn't conditional)