Вопрос

When trying to implement a SecuredAction like this:

def index = SecuredAction {
    Ok(views.html.index())
}

I'm getting a

Overloaded method value [SecuredAction] cannot be applied to (play.api.mvc.SimpleResult[play.api.templates.Html])
Это было полезно?

Решение

Forgot about implicit request =>

So:

def index = SecuredAction { implicit request =>
    Ok(views.html.index())
}

Is correct.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top