Spaces:
Running
on
A10G
Running
on
A10G
GitLab CI
commited on
Commit
·
ec814ef
1
Parent(s):
fe9a2a4
Update game build from GitLab CI
Browse files- server/__main__.py +29 -0
- server/static/godot/index.html +1 -1
- server/static/godot/index.pck +2 -2
server/__main__.py
CHANGED
@@ -91,6 +91,35 @@ def get_data():
|
|
91 |
return jsonify({"status": "success"})
|
92 |
|
93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
@app.route("/api/process", methods=["POST"])
|
95 |
def process_data():
|
96 |
try:
|
|
|
91 |
return jsonify({"status": "success"})
|
92 |
|
93 |
|
94 |
+
@app.route("/api/order", methods=["POST"])
|
95 |
+
def post_order() -> Tuple[Response, int]:
|
96 |
+
try:
|
97 |
+
data = request.get_json()
|
98 |
+
if not data or "action" not in data:
|
99 |
+
return (
|
100 |
+
jsonify({"error": "Missing 'action' in request", "status": "error"}),
|
101 |
+
400,
|
102 |
+
)
|
103 |
+
|
104 |
+
action_text: str = data["action"]
|
105 |
+
|
106 |
+
mid_split = len(action_text) // 2
|
107 |
+
# Add the text to the queue
|
108 |
+
text_queue.put(action_text[:mid_split])
|
109 |
+
text_queue.put(action_text)
|
110 |
+
text_queue.put(action_text[mid_split:])
|
111 |
+
|
112 |
+
return jsonify({"status": "success"}), 200
|
113 |
+
|
114 |
+
except Exception as e:
|
115 |
+
return (
|
116 |
+
jsonify(
|
117 |
+
{"error": f"Failed to process request: {str(e)}", "status": "error"}
|
118 |
+
),
|
119 |
+
500,
|
120 |
+
)
|
121 |
+
|
122 |
+
|
123 |
@app.route("/api/process", methods=["POST"])
|
124 |
def process_data():
|
125 |
try:
|
server/static/godot/index.html
CHANGED
@@ -97,7 +97,7 @@ body {
|
|
97 |
|
98 |
<script src="index.js"></script>
|
99 |
<script>
|
100 |
-
const GODOT_CONFIG = {"args":[],"canvasResizePolicy":2,"ensureCrossOriginIsolationHeaders":false,"executable":"index","experimentalVK":false,"fileSizes":{"index.pck":
|
101 |
const GODOT_THREADS_ENABLED = false;
|
102 |
const engine = new Engine(GODOT_CONFIG);
|
103 |
|
|
|
97 |
|
98 |
<script src="index.js"></script>
|
99 |
<script>
|
100 |
+
const GODOT_CONFIG = {"args":[],"canvasResizePolicy":2,"ensureCrossOriginIsolationHeaders":false,"executable":"index","experimentalVK":false,"fileSizes":{"index.pck":10920272,"index.wasm":35376909},"focusCanvas":true,"gdextensionLibs":[]};
|
101 |
const GODOT_THREADS_ENABLED = false;
|
102 |
const engine = new Engine(GODOT_CONFIG);
|
103 |
|
server/static/godot/index.pck
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d5a2c39c0248bc838fc68a1979fc550220e8a91a0c5ea9053167a7c098400e8c
|
3 |
+
size 10920272
|