def get(self, jid): returns = self.collection.saltReturns ret = list(returns.find({'jid': jid}).sort('_id')) return jsonify({'results': ret})
def get(self, jid): jobs = self.collection.jobs ret = jobs.find_one({'jid': jid}) return jsonify(ret)
def get(self): returns = self.collection.saltReturns ret = list(returns.find()) return jsonify({'results': ret})
def get(self): jobs = self.collection.jobs ret = list(jobs.find().sort('jid', -1)) for x in ret: x['_id'] = str(x['_id']) return jsonify({'jobs': ret})