Skip to content

Commit

Permalink
build server fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jazzpirate committed Nov 6, 2023
1 parent d2bdf6c commit 6c93755
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ class BuildServer extends ServerExtension("buildserver") with BuildManager {
apply(ServerRequest(request.method,request.headers,request.session,request.path.tail,request.query,request.body))
case ls if ls.headOption.contains("script") || ls.headOption.contains("css") =>
ServerResponse.ResourceResponse(ls.mkString("/"))
case ls if ls.headOption.contains(":action") =>
this.controller.server.get.handleRequest(ServerRequest(request.method,request.headers,request.session,request.path.tail,request.query,request.body))
case List("clear") =>
//clear()
State.synchronized {
Expand Down Expand Up @@ -123,10 +125,12 @@ class BuildServer extends ServerExtension("buildserver") with BuildManager {
}
}
ServerResponse.JsonResponse(JSONObject())
case _ =>
case Nil =>
ServerResponse.apply(
MMTSystem.getResourceAsString("/mmt-web/buildserver.html"),"text/html"
)
case o =>
ServerResponse.JsonResponse(JSONObject("error" -> JSONString("Unknown request " + o.mkString("/"))))
}
private def getQueueInfo: JSON = State.synchronized {
val qSize = State.queue.size
Expand Down

0 comments on commit 6c93755

Please sign in to comment.