Created
August 27, 2022 19:38
-
-
Save stefanozanella/b016aac022842b2c25755d64f7b9f5c2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RestController | |
class WebhooksController { | |
// ... | |
@Autowired | |
private lateinit var authorizedClientService: OAuth2AuthorizedClientService | |
@PostMapping("/webhooks/hubspot") | |
fun hubspot(@RequestBody events: List<Map<String, String>>) { | |
events | |
.map { event -> | |
println("########################") | |
println( | |
authorizedClientService.loadAuthorizedClient("hubspot", event["portalId"]) | |
) | |
println("########################") | |
// ... | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment