@@ -73,27 +73,27 @@ class Application @Inject() (
7373 message.toSeq.map(Html .apply)
7474 }
7575
76- def index = Action .async { implicit request =>
76+ def index = Action .async { case given Request [ AnyContent ] =>
7777 membersSummariser.fetchMembers.map { members =>
7878 Ok (html.index(members, releases))
7979 }
8080 }
8181
82- def widget (version : Option [String ]) = Action .async { request =>
82+ def widget (version : Option [String ]) = Action .async { case given Request [ AnyContent ] =>
8383 Future .successful(
8484 Ok (views.html.widget(news(version))),
8585 )
8686 }
8787
8888 // This used to be the download/getting-started page. We are keeping
8989 // the URL for SEO purposes only.
90- def download = Action .async { implicit request =>
90+ def download = Action .async { case given Request [ AnyContent ] =>
9191 Future .successful(
9292 MovedPermanently (routes.Application .gettingStarted.path),
9393 )
9494 }
9595
96- def gettingStarted = Action .async { implicit request =>
96+ def gettingStarted = Action .async { case given Request [ AnyContent ] =>
9797 exampleProjectsService.cached() match {
9898 case Some (cached) =>
9999 val examples = toExamples(cached)
@@ -108,8 +108,8 @@ class Application @Inject() (
108108 }
109109 }
110110
111- def allreleases (platform : Option [String ] = None ) = Action .async { implicit request =>
112- val selectedPlatform = Platform (platform.orElse(request .headers.get(" User-Agent" )))
111+ def allreleases (platform : Option [String ] = None ) = Action .async { case given Request [ AnyContent ] =>
112+ val selectedPlatform = Platform (platform.orElse(summon[ Request [ AnyContent ]] .headers.get(" User-Agent" )))
113113 Future .successful(
114114 Ok (html.allreleases(releases, selectedPlatform)),
115115 )
@@ -118,9 +118,7 @@ class Application @Inject() (
118118 def changelog =
119119 markdownAction(
120120 " public/markdown/changelog.md" ,
121- { implicit request =>
122- views.html.changelog(_)
123- },
121+ views.html.changelog(_),
124122 )
125123
126124 def conduct = Action {
@@ -130,17 +128,15 @@ class Application @Inject() (
130128 def communityProcess =
131129 markdownAction(
132130 " public/markdown/community-process.md" ,
133- { implicit request => markdown =>
134- views.html.markdownPage(" Community process" , markdown)
135- },
131+ markdown => views.html.markdownPage(" Community process" , markdown),
136132 )
137133
138134 def contributing = Action {
139135 Redirect (" https://github.com/playframework/.github/blob/main/CONTRIBUTING.md" )
140136 }
141137
142- def markdownAction (markdownFile : String , template : RequestHeader => Html => Html ) = Action .async {
143- implicit request =>
138+ def markdownAction (markdownFile : String , template : RequestHeader ? => Html => Html ) = Action .async {
139+ case given RequestHeader =>
144140 def readInputStream (is : InputStream ): String =
145141 try {
146142 IOUtils .toString(is, " utf-8" )
@@ -166,7 +162,7 @@ class Application @Inject() (
166162 page match {
167163 case Some (content) =>
168164 Future .successful(
169- Ok (template(request)( Html (content))).withHeaders(CACHE_CONTROL -> " max-age=10000" ),
165+ Ok (template(Html (content))).withHeaders(CACHE_CONTROL -> " max-age=10000" ),
170166 )
171167 case None =>
172168 Future .successful(
@@ -175,13 +171,13 @@ class Application @Inject() (
175171 }
176172 }
177173
178- def getInvolved = Action .async { implicit request =>
174+ def getInvolved = Action .async { case given Request [ AnyContent ] =>
179175 Future .successful(
180176 Ok (html.getInvolved()),
181177 )
182178 }
183179
184- def sponsors = Action .async { implicit request =>
180+ def sponsors = Action .async { case given Request [ AnyContent ] =>
185181 Future .successful(
186182 Ok (html.sponsors()),
187183 )
@@ -192,7 +188,8 @@ class Application @Inject() (
192188 MovedPermanently (url)
193189 }
194190
195- def onHandlerNotFound (route : String ) = Action .async { implicit request =>
191+ def onHandlerNotFound (route : String ) = Action .async { case given Request [AnyContent ] =>
192+ val request = summon[Request [AnyContent ]]
196193 if (
197194 route.startsWith(" play-" ) && route.endsWith(" -released" ) && ! route
198195 .contains(" -rc" ) && ! route.contains(" -m" )
0 commit comments