diff --git a/handlers/update.py b/handlers/update.py new file mode 100644 index 0000000..b8684ce --- /dev/null +++ b/handlers/update.py @@ -0,0 +1,2 @@ +def handle(request): + return "Unimplemented" \ No newline at end of file diff --git a/templates/api.html b/templates/api.html new file mode 100644 index 0000000..6150190 --- /dev/null +++ b/templates/api.html @@ -0,0 +1 @@ +Unimplemented \ No newline at end of file diff --git a/web.py b/web.py index 074c86e..406d0d8 100644 --- a/web.py +++ b/web.py @@ -2,20 +2,29 @@ import json import MySQLdb import MySQLdb.cursors from flask import Flask, make_response, request, render_template, jsonify +from handlers import update app = Flask(__name__) with open("config.json", "r") as f: - config = json.load(f) + config = json.load(f) @app.route("/") @app.route("/home") def home_index(): - return render_template("index.html") + return render_template("index.html") @app.route("/download") def download_index(): - return render_template("download.html") + return render_template("download.html") + +@app.route("/api") +def api_index(): + return render_template("api.html") + +@app.route("/api/getUpdate", methods=["GET", "POST"]) +def api_update(): + return update.handle(request) if __name__ == "__main__": - app.run(**config["web"]) \ No newline at end of file + app.run(**config["web"]) \ No newline at end of file