def delete_mscan_location_json(mscan_id, loc_id): s = MScanService(g.user) s.delete_location(mscan_id, loc_id) return jsonify(s.to_json(selected_id=mscan_id))
def market_info_json(mscan_id): s = MScanService(g.user) s.market_info(mscan_id) return jsonify(s.to_json(selected_id=mscan_id))
def update_mscan_json(mscan_id): s = MScanService(g.user) s.update_mscan(mscan_id, request.get_json()) return jsonify(s.to_json(selected_id=mscan_id))
def add_mscan_location_json(mscan_id): s = MScanService(g.user) s.add_location(mscan_id, request.get_json()) return jsonify(s.to_json(selected_id=mscan_id))
def mscan_json(mscan_id): s = MScanService(g.user) return jsonify(s.to_json(selected_id=mscan_id))
def delete_mscan(mscan_id): s = MScanService(g.user) s.delete_scan(mscan_id) return jsonify(s.to_json())
def rename_mscan(mscan_id): s = MScanService(g.user) s.rename_scan(mscan_id, request.get_json()['name']) return jsonify(s.to_json())
def add_mscan(): s = MScanService(g.user) new_id = s.add_scan(request.get_json()['name']) return jsonify(s.to_json(selected_id=new_id))
def mscans_list(): s = MScanService(g.user) return jsonify(s.to_json())