Spaces:
Running
on
A10G
Running
on
A10G
GitLab CI
commited on
Commit
·
8419299
1
Parent(s):
c158679
Update game build from GitLab CI
Browse files- server/__main__.py +18 -3
- server/static/godot/index.html +1 -1
- server/static/godot/index.pck +2 -2
server/__main__.py
CHANGED
@@ -100,7 +100,13 @@ def post_order() -> Tuple[Response, int]:
|
|
100 |
|
101 |
action_text: str = data["action"]
|
102 |
|
103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
|
105 |
mid_split = len(action_text) // 2
|
106 |
# Add the text to the queue
|
@@ -124,7 +130,13 @@ def process_data():
|
|
124 |
try:
|
125 |
# Check content type
|
126 |
content_type = request.headers.get("Content-Type", "")
|
127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
|
129 |
# Handle different content types
|
130 |
if "application/json" in content_type:
|
@@ -177,7 +189,10 @@ def process_data():
|
|
177 |
@app.route("/api/actions", methods=["GET"])
|
178 |
def get_actions() -> Tuple[Response, int]:
|
179 |
"""Retrieve and clear all pending actions for the current session"""
|
180 |
-
|
|
|
|
|
|
|
181 |
|
182 |
with action_storage_lock:
|
183 |
# Get and clear actions for this session
|
|
|
100 |
|
101 |
action_text: str = data["action"]
|
102 |
|
103 |
+
chunks = request.headers.get("Authorization", "").split(" ")
|
104 |
+
if len(chunks) < 2:
|
105 |
+
return (
|
106 |
+
jsonify({"error": "Missing token in request", "status": "error"}),
|
107 |
+
400,
|
108 |
+
)
|
109 |
+
token: str = chunks[1]
|
110 |
|
111 |
mid_split = len(action_text) // 2
|
112 |
# Add the text to the queue
|
|
|
130 |
try:
|
131 |
# Check content type
|
132 |
content_type = request.headers.get("Content-Type", "")
|
133 |
+
chunks = request.headers.get("Authorization", "").split(" ")
|
134 |
+
if len(chunks) < 2:
|
135 |
+
return (
|
136 |
+
jsonify({"error": "Missing token in request", "status": "error"}),
|
137 |
+
400,
|
138 |
+
)
|
139 |
+
token: str = chunks[1]
|
140 |
|
141 |
# Handle different content types
|
142 |
if "application/json" in content_type:
|
|
|
189 |
@app.route("/api/actions", methods=["GET"])
|
190 |
def get_actions() -> Tuple[Response, int]:
|
191 |
"""Retrieve and clear all pending actions for the current session"""
|
192 |
+
chunks = request.headers.get("Authorization", "").split(" ")
|
193 |
+
if len(chunks) < 2:
|
194 |
+
return jsonify({"actions": [], "status": "error"}), 400
|
195 |
+
token: str = chunks[1]
|
196 |
|
197 |
with action_storage_lock:
|
198 |
# Get and clear actions for this session
|
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":18582544,"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:1a01e04d4240f32cf8ffbd67692199bf157e0b0e238614b75ca6874e5e867d24
|
3 |
+
size 18582544
|