diff --git a/server/api/__init__.py b/server/api/__init__.py index fc4a687..0876fc5 100644 --- a/server/api/__init__.py +++ b/server/api/__init__.py @@ -1,4 +1,4 @@ -import api +import admin import models import user import utils \ No newline at end of file diff --git a/server/api/admin.py b/server/api/admin.py new file mode 100644 index 0000000..4f72f9f --- /dev/null +++ b/server/api/admin.py @@ -0,0 +1,4 @@ +from flask import Blueprint +from utils import api_wrapper + +blueprint = Blueprint("admin", __name__) \ No newline at end of file diff --git a/server/api/api.py b/server/api/api.py deleted file mode 100644 index 7626508..0000000 --- a/server/api/api.py +++ /dev/null @@ -1,11 +0,0 @@ -from flask import Blueprint - -api = Blueprint("api", __name__) - -@api.route("/api/register", methods=["POST"]) -def register(): - pass - -@api.route("/api/login", methods=["POST"]) -def login(): - pass diff --git a/server/app.py b/server/app.py index 9ee2124..5d52e6f 100644 --- a/server/app.py +++ b/server/app.py @@ -31,6 +31,7 @@ if __name__ == "__main__": db.init_app(app) db.create_all() + app.register_blueprint(api.admin.blueprint, url_prefix="/api/admin") app.register_blueprint(api.user.blueprint, url_prefix="/api/user") - app.run(host="0.0.0.0", port=8000) + app.run(host="0.0.0.0", port=8000) \ No newline at end of file diff --git a/web/index.html b/web/index.html index 8fdc701..25e55e3 100644 --- a/web/index.html +++ b/web/index.html @@ -6,14 +6,50 @@ + - Angular.js Status: Failed! - + - + \ No newline at end of file