From 97a407791cbacb0b905dadd4506175ce2c0ad364 Mon Sep 17 00:00:00 2001 From: KjellBerlin Date: Fri, 30 Aug 2024 18:03:01 +0200 Subject: [PATCH] Put orderId into button values --- .../com/carbonara/core/slack/SlackMessageService.kt | 10 +++++----- .../com/carbonara/core/slack/SlackWebhookController.kt | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/com/carbonara/core/slack/SlackMessageService.kt b/src/main/kotlin/com/carbonara/core/slack/SlackMessageService.kt index f6ef43f..732eed8 100644 --- a/src/main/kotlin/com/carbonara/core/slack/SlackMessageService.kt +++ b/src/main/kotlin/com/carbonara/core/slack/SlackMessageService.kt @@ -43,25 +43,25 @@ class SlackMessageService { button { text("ACCEPT", emoji = true) style("primary") - value("processing_order") - actionId("processing_order") + value(orderId) + actionId("accept") } button { text("DELIVERY IN PROGRESS", emoji = true) style("primary") - value("delivery_in_progress") + value(orderId) actionId("delivery_in_progress") } button { text("DELIVERED", emoji = true) style("danger") - value("delivered") + value(orderId) actionId("delivered") } button { text("CANCELLED", emoji = true) style("danger") - value("cancelled") + value(orderId) actionId("cancelled") } } diff --git a/src/main/kotlin/com/carbonara/core/slack/SlackWebhookController.kt b/src/main/kotlin/com/carbonara/core/slack/SlackWebhookController.kt index 3282590..743d3e5 100644 --- a/src/main/kotlin/com/carbonara/core/slack/SlackWebhookController.kt +++ b/src/main/kotlin/com/carbonara/core/slack/SlackWebhookController.kt @@ -14,7 +14,7 @@ class SlackDeliveryWebhookController( // TODO: Handle webhook - @PostMapping("/slack-delivery-status", "application/x-www-form-urlencoded") + @PostMapping("/slack-delivery-status", consumes = ["application/x-www-form-urlencoded"]) suspend fun handleSlackWebhook(requestBody: SlackWebhookRequestBody) { log.info("--Start Slack--") log.info(requestBody.payload)