From c79489c4cf12b3fb64a5863d9364b977b68e5bf5 Mon Sep 17 00:00:00 2001 From: James Wang Date: Wed, 23 Dec 2015 20:12:23 -0500 Subject: [PATCH] Fix blueprint route --- server/api/user.py | 2 +- server/app.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/server/api/user.py b/server/api/user.py index 2150358..a9b179d 100644 --- a/server/api/user.py +++ b/server/api/user.py @@ -17,4 +17,4 @@ def user_logout(): @blueprint.route("/login", methods=["POST"]) @api_wrapper def user_login(): - pass \ No newline at end of file + pass diff --git a/server/app.py b/server/app.py index cb2aa98..785b054 100644 --- a/server/app.py +++ b/server/app.py @@ -11,7 +11,7 @@ from api.user import blueprint as user_blueprint app = Flask(__name__) app.secret_key = config.SECRET app.register_blueprint(api_blueprint) -app.register_blueprint(user_blueprint) +app.register_blueprint(user_blueprint, url_prefix="/api/user") @app.route("/api") def api_main(): @@ -33,6 +33,4 @@ if __name__ == "__main__": db.init_app(app) db.create_all() - app.register_blueprint(api.user.blueprint, url_prefix="/api/user") - app.run(host="0.0.0.0", port=8000)