Skip to content

Commit a6e7989

Browse files
committed
Adapt example controller to inherit from AbstractController
1 parent 5ac0dec commit a6e7989

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ To illustrate this, here is an example controller:
7373
```scala
7474
import play.api.mvc._
7575

76-
class Sales(saleRepository: SaleRepository) extends Controller with ContentNegotiation {
76+
class Sales(saleRepository: SaleRepository, cc: ControllerComponents) extends AbstractController(cc) with ContentNegotiation {
7777
def negotiate()(implicit req: RequestHeader) = represent[Sale](
7878
as(Accepts.Html, views.html.sale(_)),
7979
as(Accepts.Json, Json.toJson(_))

0 commit comments

Comments
 (0)