fix refresh events
All checks were successful
/ Build BaseBand SPLServer (push) Successful in 16s

This commit is contained in:
Daniella / Tove 2024-10-14 12:57:08 +02:00
parent 2308db4aba
commit 3e530abb65
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -92,7 +92,7 @@ func props-to-json { | with props ;
"\": " concat
value properties props-to-json concat
}>
:join<", "> concat
:join<", "> concat
"}" concat
}
@ -105,7 +105,9 @@ func main { exitcode | with args ;
def clients LinkedList:new =clients
func dir { | with client dir location ;
func dir { | with client dir id ;
def location "/" id concat =location
dir "/BaseBand-release.jar" concat location "/download/client/release" concat client:serve-file-cached;<"application/octet-stream">
dir "/BaseBand-main.jar" concat location "/download/client/main" concat client:serve-file-cached;<"application/octet-stream">
dir "/BaseBand-Loader.jar" concat location "/download/loader" concat client:serve-file-cached;<"application/octet-stream">
@ -115,7 +117,7 @@ func dir { | with client dir location ;
}
"/refresh" client:path eq if {
def event "refresh:" location concat dir Branches:new Event:new:json =event
def event "refresh:" id concat dir Branches:new Event:new:json =event
def new-clients LinkedList:new =new-clients
clients:foreach<{ | with client ;
catch IO {
@ -142,8 +144,8 @@ func handle-client { | with client ;
"index.html" "/" client:serve-html-cached;
client "rewrite" "/1.12.2" dir
client "ednieva" "/ednieva" dir
client "rewrite" "1.12.2" dir
client "ednieva" "ednieva" dir
"/listen" client:path eq if {
client