def getBlibbShort(short_id=None): if short_id is None: abort(404) o = Blibb.get_object({'si': short_id}) r = Blibb.flat_object(o) if r != 'null': return jsonify(r) else: abort(404)
def getObject(bid=None): if bid is not None: params = request.args.get('fields') fields = dict() for p in params.split(','): fields[p] = 1 current_app.logger.info(fields) doc = Blibb.get_object({'_id': ObjectId(bid)}, fields) blibb = Blibb.to_dict(doc) # return jsonify(Blibb.flat_object(blibb)) abort(404)
def getBlibb(blibb_id=None, params=None): if blibb_id is None: abort(404) if params is None: o = Blibb.get_object(blibb_id) r = Blibb.flat_object(o) else: r = Blibb.get_by_id_params(blibb_id, params) if r != 'null': return jsonify(r) else: abort(404)