File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
packages/kitten-analysts/source Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,10 @@ import { kg_unicorns_sacrificed } from "./metrics/kg_unicorns_sacrificed.js";
54
54
import { kg_years_total } from "./metrics/kg_years_total.js" ;
55
55
import { KittensGameRemote } from "./network/KittensGameRemote.js" ;
56
56
57
+ export interface KGNetChiralCommand {
58
+ command : string ;
59
+ }
60
+
57
61
const PORT_HTTP_KGNET = process . env . PORT_HTTP_KGNET ? Number ( process . env . PORT_HTTP_KGNET ) : 7780 ;
58
62
const PORT_HTTP_METRICS = process . env . PORT_WS_BACKEND
59
63
? Number ( process . env . PORT_HTTP_METRICS )
@@ -286,6 +290,20 @@ routerNetwork.post("/kgnet/save/update", context => {
286
290
}
287
291
} ) ;
288
292
293
+ routerNetwork . post ( "/kgnet/chiral/game/command/" , context => {
294
+ try {
295
+ //const payload = context.request.body as KGNetChiralCommand;
296
+ context . status = 200 ;
297
+ context . body = JSON . stringify ( {
298
+ clientState : `Command received at ${ new Date ( ) . toISOString ( ) } .` ,
299
+ } ) ;
300
+ return ;
301
+ } catch ( error ) {
302
+ console . error ( error ) ;
303
+ context . status = 500 ;
304
+ }
305
+ } ) ;
306
+
289
307
async function main ( ) {
290
308
try {
291
309
const entries = await readdir ( LOCAL_STORAGE_PATH ) ;
You can’t perform that action at this time.
0 commit comments