예제 #1
0
 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]}
예제 #2
0
파일: store.py 프로젝트: iebgener/flask6
 def get(self):
     return {'stores': [store.json() for store in StoreModel.get_all()]}
예제 #3
0
 def get(self):
     stores = [item.json() for item in StoreModel.get_all()]
     return {'stores': stores}
예제 #4
0
 def get(self):
     storesJson = [s.json() for s in StoreModel.get_all()]
     return {'stores': storesJson}