Skip to content

Commit 1ebea21

Browse files
authored
Update app.py
Import and endpoint missing Line 8 should have included `, StoreList` Needed to add line 23: `api.add_resource(StoreList, '/stores')`
1 parent fa3b0e4 commit 1ebea21

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

section6/app.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
from security import authenticate, identity
66
from resources.user import UserRegister
77
from resources.item import Item, ItemList
8-
from resources.store import Store
8+
from resources.store import Store, StoreList
99

1010
app = Flask(__name__)
1111
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///data.db'
1212
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
13-
app.secret_key = 'jose'
13+
app.secret_key = 'EiEiO'
1414
api = Api(app)
1515

1616
@app.before_first_request
@@ -20,6 +20,7 @@ def create_tables():
2020
jwt = JWT(app, authenticate, identity) # /auth
2121

2222
api.add_resource(Store, '/store/<string:name>')
23+
api.add_resource(StoreList, '/stores')
2324
api.add_resource(Item, '/item/<string:name>')
2425
api.add_resource(ItemList, '/items')
2526
api.add_resource(UserRegister, '/register')

0 commit comments

Comments
 (0)