feat(ui): added js routing for create game

added js routing for create game, removed the form and button
This commit is contained in:
LQ63
2025-11-11 14:10:37 +01:00
parent 33989efedc
commit b508d2f428
6 changed files with 107 additions and 34 deletions

View File

@@ -0,0 +1,23 @@
package controllers
import auth.{AuthAction, AuthenticatedRequest}
import logic.PodManager
import play.api.mvc.{Action, AnyContent, BaseController, ControllerComponents}
import play.api.routing.JavaScriptReverseRouter
import javax.inject.Inject
class JavaScriptRoutingController @Inject()(
val controllerComponents: ControllerComponents,
val authAction: AuthAction,
val podManager: PodManager
) extends BaseController {
def javascriptRoutes(): Action[AnyContent] = authAction { implicit request: AuthenticatedRequest[AnyContent] =>
Ok(
JavaScriptReverseRouter("jsRoutes")(
routes.javascript.MainMenuController.createGame,
routes.javascript.IngameController.startGame
)
).as("text/javascript")
}
}