diff --git a/section6/app.py b/section6/app.py index cb38d982..743475d4 100644 --- a/section6/app.py +++ b/section6/app.py @@ -5,12 +5,12 @@ from security import authenticate, identity from resources.user import UserRegister from resources.item import Item, ItemList -from resources.store import Store +from resources.store import Store, StoreList app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///data.db' app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False -app.secret_key = 'jose' +app.secret_key = 'EiEiO' api = Api(app) @app.before_first_request @@ -20,6 +20,7 @@ def create_tables(): jwt = JWT(app, authenticate, identity) # /auth api.add_resource(Store, '/store/') +api.add_resource(StoreList, '/stores') api.add_resource(Item, '/item/') api.add_resource(ItemList, '/items') api.add_resource(UserRegister, '/register')