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]}
Example #2
0
 def get(self):
     return {'stores': [store.json() for store in StoreModel.get_all()]}
Example #3
0
 def get(self):
     stores = [item.json() for item in StoreModel.get_all()]
     return {'stores': stores}
Example #4
0
 def get(self):
     storesJson = [s.json() for s in StoreModel.get_all()]
     return {'stores': storesJson}