سؤال

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