From 5485eba61a06fdbfee034160c5081966186454e9 Mon Sep 17 00:00:00 2001 From: KjellBerlin Date: Fri, 9 Aug 2024 13:35:18 +0200 Subject: [PATCH] Slack payload as request param --- .../core/delivery/SlackDeliveryWebhookController.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/com/carbonara/core/delivery/SlackDeliveryWebhookController.kt b/src/main/kotlin/com/carbonara/core/delivery/SlackDeliveryWebhookController.kt index 1a16dc0..7aa714a 100644 --- a/src/main/kotlin/com/carbonara/core/delivery/SlackDeliveryWebhookController.kt +++ b/src/main/kotlin/com/carbonara/core/delivery/SlackDeliveryWebhookController.kt @@ -3,7 +3,7 @@ package com.carbonara.core.delivery import com.carbonara.core.order.OrderService import mu.KotlinLogging import org.springframework.web.bind.annotation.PostMapping -import org.springframework.web.bind.annotation.RequestBody +import org.springframework.web.bind.annotation.RequestParam import org.springframework.web.bind.annotation.RestController @RestController @@ -14,9 +14,9 @@ class SlackDeliveryWebhookController( // Potential dos attack endpoint, introduce rate limiting @PostMapping("/slack-delivery-status", consumes = ["application/json"]) - suspend fun handleSlackWebhook(@RequestBody requestBody: String) { + suspend fun handleSlackWebhook(@RequestParam("payload") payload: String) { log.info("--Start Slack--") - log.info(requestBody) + log.info(payload) log.info("--End Slack--") }