def get(self): user_id = get_jwt_identity() stores = [store.json() for store in StoreModel.find_all()] if user_id: return {'stores':stores},200 return {'items': [store['name'] for store in stores], 'message': 'Login or provide authorization header to get detailed item information' },200
def get(self): """ Get all Store details GET /stores """ stores = StoreModel.find_all() if stores: return {"stores": [store.json() for store in stores]}, 200 else: return {"message": "Sorry, No Store Found!"}, 404
def get(self): return {'stores': [store.json() for store in StoreModel.find_all()]}
def get(self): stores = StoreModel.find_all() return {"stores": [store.json() for store in stores]}