From 1ebea2168da3c7f8232a4dc2143083b8f49e2da8 Mon Sep 17 00:00:00 2001 From: Greg Meece Date: Mon, 10 Jul 2017 18:54:47 -0500 Subject: [PATCH] Update app.py Import and endpoint missing Line 8 should have included `, StoreList` Needed to add line 23: `api.add_resource(StoreList, '/stores')` --- section6/app.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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')