Skip to content

Commit

Permalink
Merge pull request #57 from KjellBerlin/update-slack-payload
Browse files Browse the repository at this point in the history
Slack payload as request param
  • Loading branch information
KjellBerlin authored Aug 9, 2024
2 parents 885f9a0 + 5485eba commit 76e718b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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--")

}
Expand Down

0 comments on commit 76e718b

Please sign in to comment.