       # no filterRepresentation supplied - simple view
       # view minimum required data for transactions
       return { "request.body": 0, "request.headers": 0, "response.body": 0, "response.headers": 0, orchestrations: 0, routes: 0 }
-  
+
 
 
 

###
exports.updateTransaction = (transactionId) ->

  # Test if the user is authorised
  if not authorisation.inGroup 'admin', this.authenticated
    utils.logAndSetResponse this, 'forbidden', "User #{this.authenticated.email} is not an admin, API access to updateTransaction denied.", 'info'
    return

  transactionId = unescape transactionId
  updates = this.request.body

  try
    yield transactions.Transaction.findByIdAndUpdate(transactionId, updates).exec()
    this.body = "Transaction with ID: #{transactionId} successfully updated"
    this.status = 'ok'
    logger.info "User #{this.authenticated.email} updated transaction with id #{transactionId}"
  catch e
    utils.logAndSetResponse this, 'internal server error', "Could not update transaction via the API: #{e}", 'error'


      .find filtersObject, projectionFiltersObject
      .sort 'request.timestamp': -1
      .exec()

  catch e
    utils.logAndSetResponse this, 'internal server error', "Could not get transaction by clientID via the API: #{e}", 'error'

