Note: When you are using nested data this way, the form values sent by the browser must be named like address.street, address.city, etc.(ссылка)
args[accountName] -> Login, args[code] -> code123,
class UserApi @Inject() (db: play.api.db.DBApi ) {
val dababase = db.database("name")
def login(email: String, password: String): Option[User] = {
dababase.withConnection { implicit c =>
// TODO
}
}
}
//controller
class MyController @Inject() (userApi: UserApi ) extends Conroller {
//your code
}