Skip to content

Commit

Permalink
Update app.py
Browse files Browse the repository at this point in the history
Import and endpoint missing
Line 8 should have included `, StoreList`
Needed to add line 23: `api.add_resource(StoreList, '/stores')`
  • Loading branch information
GLMeece authored Jul 10, 2017
1 parent fa3b0e4 commit 1ebea21
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions section6/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -20,6 +20,7 @@ def create_tables():
jwt = JWT(app, authenticate, identity) # /auth

api.add_resource(Store, '/store/<string:name>')
api.add_resource(StoreList, '/stores')
api.add_resource(Item, '/item/<string:name>')
api.add_resource(ItemList, '/items')
api.add_resource(UserRegister, '/register')
Expand Down

0 comments on commit 1ebea21

Please sign in to comment.