def get_pois(): store = DataStore() query_dic = dict() use_query = False for k in PointOfInterest().__dict__.keys(): v = request.args.get(k, None) if v is not None: query_dic[k] = v use_query = True if use_query: pois = store.get_poi_filtered(query_dic) else: pois = store.get_all_poi() return to_json(pois)
def get_all_pois_test(): store = DataStore() pois = store.get_all_poi() return to_json(pois)