Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class HomeController @Inject()(env: Environment, conf: Configuration, assets: Assets, authenticatedAction: AuthenticatedAction, cc: ControllerComponents, implicit val config: ServiceConfig)(implicit ec: ExecutionContext)
- extends AbstractController(cc) {
- private val logger = play.api.Logger(this.getClass)
- private def doServeArbitraryRoutes(route: String): Action[AnyContent] = Action.async {
- request: Request[AnyContent] => {
- Future {
- authenticatedAction.isSessionValid(request)
- .map(authenticatedRequest => Ok(views.html.index("Human Intelligent Tasks")))
- .getOrElse(Redirect(routes.HomeController.login())
- )
- }
- }
- }
- def index: Action[AnyContent] = doServeArbitraryRoutes("")
- }
Add Comment
Please, Sign In to add comment