def get(self): user_id = get_jwt_identity() stores = StoreModel.get_all() store_array = [store.json() for store in stores] if user_id: return {"stores": store_array} else: return {"stores": [{'id': store['id']} for store in store_array]}
def get(self): return {'stores': [store.json() for store in StoreModel.get_all()]}
def get(self): stores = [item.json() for item in StoreModel.get_all()] return {'stores': stores}
def get(self): storesJson = [s.json() for s in StoreModel.get_all()] return {'stores': storesJson}