Skip to content

Commit

Permalink
swapping clientId for client
Browse files Browse the repository at this point in the history
  • Loading branch information
elabeca authored Feb 11, 2021
2 parents 0eab977 + 5bbc397 commit 5a0ac6d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ class MessagesController @Inject()(
message: message)
extends FrontendController(controllerComponents) with I18nSupport {

def display(clientService: String, clientId: String, conversationId: String): Action[AnyContent] = Action {
def display(clientService: String, client: String, conversationId: String): Action[AnyContent] = Action {
implicit request =>
Ok(message(messagePartial(clientId), clientService: String, conversationId: String))
Ok(message(messagePartial(client), clientService: String, conversationId: String))
}

def saveReply(clientService: String, clientId: String, conversationId: String): Action[AnyContent] = Action {
def saveReply(clientService: String, client: String, conversationId: String): Action[AnyContent] = Action {

Created(s"Saved reply successfull with client $clientService clientId $clientId and conversationId $conversationId")
Created(s"Saved reply successfull with client $clientService client $client and conversationId $conversationId")
}

def response(clientService: String, clientId: String, conversationId: String): Action[AnyContent] = Action {
def response(clientService: String, client: String, conversationId: String): Action[AnyContent] = Action {

Ok(s"$clientService with clientId $clientId with conversationId $conversationId")
Ok(s"$clientService with client $client with conversationId $conversationId")
}

private def messageContent(messageId: String) = FakeData.messages.find(_.id === messageId).map(_.content)
Expand Down
6 changes: 3 additions & 3 deletions conf/app.routes
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ GET /hello-world uk.gov.hmrc.securemessagefrontend.controller

GET /:clientService/conversations uk.gov.hmrc.securemessagefrontend.controllers.ConversationsController.display(clientService)

GET /:clientService/conversation/:clientId/:conversationId uk.gov.hmrc.securemessagefrontend.controllers.MessagesController.display(clientService, clientId, conversationId)
GET /:clientService/conversation/:client/:conversationId uk.gov.hmrc.securemessagefrontend.controllers.MessagesController.display(clientService, client, conversationId)

POST /:clientService/conversation/:clientId/:conversationId uk.gov.hmrc.securemessagefrontend.controllers.MessagesController.saveReply(clientService, clientId, conversationId)
POST /:clientService/conversation/:client/:conversationId uk.gov.hmrc.securemessagefrontend.controllers.MessagesController.saveReply(clientService, client, conversationId)

GET /:clientService/conversation/:clientId/:conversationId/result uk.gov.hmrc.securemessagefrontend.controllers.MessagesController.response(clientService, clientId, conversationId)
GET /:clientService/conversation/:client/:conversationId/result uk.gov.hmrc.securemessagefrontend.controllers.MessagesController.response(clientService, client, conversationId)

### NoDocs ###
GET /language/:lang uk.gov.hmrc.securemessagefrontend.controllers.LanguageSwitchController.selectLanguage(lang: Language)
Expand Down
2 changes: 1 addition & 1 deletion project/AppDependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ object AppDependencies {
"uk.gov.hmrc" %% "play-frontend-govuk" % "0.60.0-play-27",
"uk.gov.hmrc" %% "play-language" % "4.10.0-play-27",
"com.iheart" %% "play-swagger" % "0.10.2",
"org.typelevel" %% "cats-core" % "2.4.0"
"org.typelevel" %% "cats-core" % "2.4.1"
)

val test = Seq(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class MessagesControllerSpec extends PlaySpec with GuiceOneAppPerSuite {

status(result) mustBe Status.CREATED
val pageContent = contentAsString(result)
pageContent must include("Saved reply successfull with client some-service clientId 111 and conversationId DA123")
pageContent must include("Saved reply successfull with client some-service client 111 and conversationId DA123")
}

"response" in new TestCase {
Expand All @@ -59,7 +59,7 @@ class MessagesControllerSpec extends PlaySpec with GuiceOneAppPerSuite {

status(result) mustBe Status.OK
val pageContent = contentAsString(result)
pageContent must include("some-service with clientId 111 with conversationId DA123")
pageContent must include("some-service with client 111 with conversationId DA123")
}
}

Expand Down

0 comments on commit 5a0ac6d

Please sign in to comment.