TODO
is convenient when coding controllers:
object Application extends Controller {
def test = Action { TODO }
}
It's fine. But this:
def login = Action { implicit request => TODO }
It won't pass the compilation, the error message is:
type mismatch; found : play.api.mvc.Action[play.api.mvc.AnyContent]
required: play.api.mvc.Result
I have to remove the iplicit request
part, or use Ok("todo")
instead, which is not convenient.
How to fix it or do I miss something?
As Guillaume Bort said in google group, it's actually an Action, not a result. So we should use it as:
def test = TODO
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With