summaryrefslogtreecommitdiff
path: root/templates/api.py
diff options
context:
space:
mode:
authornasrlol <nsrddyn@gmail.com>2024-11-27 00:54:43 +0100
committernasrlol <nsrddyn@gmail.com>2024-11-27 00:54:43 +0100
commitdf6d2c51b15d55a30b8515de637aa7af490b2d95 (patch)
tree25afa36b2be61783997eb59633e9c7e4aff438b7 /templates/api.py
parent4e86a2ee9f5578cbaae6cc7dd52616e3e3751764 (diff)
small modifications to the file system
Diffstat (limited to 'templates/api.py')
-rw-r--r--templates/api.py27
1 files changed, 0 insertions, 27 deletions
diff --git a/templates/api.py b/templates/api.py
deleted file mode 100644
index b04ef77..0000000
--- a/templates/api.py
+++ /dev/null
@@ -1,27 +0,0 @@
-from flask import Flask, request, jsonify, render_template
-
-app = Flask(__name__)
-
-
-@app.route("/")
-def index():
- return render_template("index.html")
-
-
-@app.route("/api/run-script", methods=["POST"])
-def run_script():
- data = request.json
- if not data:
- return jsonify({"error": "No data provided"}), 400
-
- script_result = my_script_logic(data.get("input"))
-
- return jsonify({"result": script_result})
-
-
-def my_script_logic(input_value):
- return f"Processed input: {input_value}"
-
-
-if __name__ == "__main__":
- app.run(host="0.0.0.0", port=5000, debug=True)