feat(ui): added js routing for create game
added js routing for create game, removed the form and button
This commit is contained in:
@@ -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")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user