From 225e55b574be9f6ff57fb92bfa0ebad964f3295f Mon Sep 17 00:00:00 2001 From: charanCharizard Date: Thu, 12 Aug 2021 13:20:50 -0400 Subject: [PATCH] BPWA-105 | Fixing some URL convention misses on APIs which caused errors --- build.gradle.kts | 2 +- .../protocol/cancel/controllers/PollCancelResponseController.kt | 2 +- .../support/controllers/PollOnSupportResponseController.kt | 2 +- .../cancel/controllers/PollOnCancelResponseControllerSpec.kt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 12fcbc2..d2ce51c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -48,7 +48,7 @@ dependencies { implementation("io.arrow-kt:arrow-optics:0.13.2") implementation("org.litote.kmongo:kmongo:4.2.8") implementation("org.mapstruct:mapstruct:1.4.2.Final") - implementation("org.beckn.jvm:beckn-protocol-dtos:0.9.1.16") + implementation("org.beckn.jvm:beckn-protocol-dtos:0.9.1.17") implementation("org.bouncycastle:bcprov-jdk15on:1.69") implementation("commons-codec:commons-codec:1.15") implementation("com.squareup.retrofit2:retrofit:$retrofitVersion") diff --git a/src/main/kotlin/org/beckn/one/sandbox/bap/protocol/cancel/controllers/PollCancelResponseController.kt b/src/main/kotlin/org/beckn/one/sandbox/bap/protocol/cancel/controllers/PollCancelResponseController.kt index 9db0e7c..345b9cf 100644 --- a/src/main/kotlin/org/beckn/one/sandbox/bap/protocol/cancel/controllers/PollCancelResponseController.kt +++ b/src/main/kotlin/org/beckn/one/sandbox/bap/protocol/cancel/controllers/PollCancelResponseController.kt @@ -15,7 +15,7 @@ class PollCancelResponseController @Autowired constructor( contextFactory: ContextFactory ) : AbstractPollForResponseController(responseService, contextFactory) { - @GetMapping("protocol/v1/on_cancel") + @GetMapping("protocol/response/v1/on_cancel") @ResponseBody fun getCancelResponses(messageId: String) = findResponses(messageId) } \ No newline at end of file diff --git a/src/main/kotlin/org/beckn/one/sandbox/bap/protocol/support/controllers/PollOnSupportResponseController.kt b/src/main/kotlin/org/beckn/one/sandbox/bap/protocol/support/controllers/PollOnSupportResponseController.kt index 7517185..6f0fefa 100644 --- a/src/main/kotlin/org/beckn/one/sandbox/bap/protocol/support/controllers/PollOnSupportResponseController.kt +++ b/src/main/kotlin/org/beckn/one/sandbox/bap/protocol/support/controllers/PollOnSupportResponseController.kt @@ -15,7 +15,7 @@ class PollOnSupportResponseController @Autowired constructor( contextFactory: ContextFactory ) : AbstractPollForResponseController(responseService, contextFactory) { - @RequestMapping("protocol/v1/on_support") + @RequestMapping("protocol/response/v1/on_support") @ResponseBody fun getSupportResponses(messageId: String) = findResponses(messageId) diff --git a/src/test/kotlin/org/beckn/one/sandbox/bap/protocol/cancel/controllers/PollOnCancelResponseControllerSpec.kt b/src/test/kotlin/org/beckn/one/sandbox/bap/protocol/cancel/controllers/PollOnCancelResponseControllerSpec.kt index 83eee9d..0ac3988 100644 --- a/src/test/kotlin/org/beckn/one/sandbox/bap/protocol/cancel/controllers/PollOnCancelResponseControllerSpec.kt +++ b/src/test/kotlin/org/beckn/one/sandbox/bap/protocol/cancel/controllers/PollOnCancelResponseControllerSpec.kt @@ -72,7 +72,7 @@ internal class PollOnCancelResponseControllerSpec @Autowired constructor( context("when called for given message id") { val onCancelCall = mockMvc .perform( - MockMvcRequestBuilders.get("/protocol/v1/on_cancel") + MockMvcRequestBuilders.get("/protocol/response/v1/on_cancel") .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) .param("messageId", entityContext.messageId) )