diff --git a/app/uk/gov/hmrc/cataloguefrontend/SearchByUrlController.scala b/app/uk/gov/hmrc/cataloguefrontend/SearchByUrlController.scala index d88a6bbf5..af2af1ab9 100644 --- a/app/uk/gov/hmrc/cataloguefrontend/SearchByUrlController.scala +++ b/app/uk/gov/hmrc/cataloguefrontend/SearchByUrlController.scala @@ -38,11 +38,9 @@ class SearchByUrlController @Inject() ( ) extends FrontendController(mcc) with CatalogueAuthBuilders: - private val serviceNameToUrl = routes.CatalogueController.service - def searchLanding: Action[AnyContent] = BasicAuthAction.async { implicit request => - Future.successful(Ok(searchByUrlPage(UrlSearchFilter.form, Nil, serviceNameToUrl))) + Future.successful(Ok(searchByUrlPage(UrlSearchFilter.form, Nil))) } def searchUrl = @@ -50,11 +48,11 @@ class SearchByUrlController @Inject() ( UrlSearchFilter.form .bindFromRequest() .fold( - formWithErrors => Future.successful(Ok(searchByUrlPage(formWithErrors, Nil, serviceNameToUrl))), + formWithErrors => Future.successful(Ok(searchByUrlPage(formWithErrors, Nil))), query => searchByUrlService .search(query.name) .map: results => - Ok(searchByUrlPage(UrlSearchFilter.form.bindFromRequest(), results, serviceNameToUrl)) + Ok(searchByUrlPage(UrlSearchFilter.form.bindFromRequest(), results)) ) } diff --git a/app/uk/gov/hmrc/cataloguefrontend/view/SearchByUrlPage.scala.html b/app/uk/gov/hmrc/cataloguefrontend/view/SearchByUrlPage.scala.html index a21987cb3..98154d625 100644 --- a/app/uk/gov/hmrc/cataloguefrontend/view/SearchByUrlPage.scala.html +++ b/app/uk/gov/hmrc/cataloguefrontend/view/SearchByUrlPage.scala.html @@ -15,13 +15,13 @@ *@ @import play.api.mvc.Call +@import uk.gov.hmrc.cataloguefrontend.{routes => appRoutes} @import uk.gov.hmrc.cataloguefrontend.service.SearchByUrlService.FrontendRoutes @this() @(form : Form[?], - searchResults : Seq[FrontendRoutes], - serviceNameToUrl: ServiceName => Call + searchResults : Seq[FrontendRoutes] )(implicit request : RequestHeader ) @@ -64,7 +64,7 @@