From 67311d93f477651ea52b94f93768e04d7dcefb19 Mon Sep 17 00:00:00 2001 From: Florian Date: Mon, 4 Nov 2024 10:49:03 +0100 Subject: [PATCH] Use proper class for callback payload --- .../digitalservice/a2j/controller/SubscriberController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/bund/digitalservice/a2j/controller/SubscriberController.java b/src/main/java/de/bund/digitalservice/a2j/controller/SubscriberController.java index 06ef851..7adafc3 100644 --- a/src/main/java/de/bund/digitalservice/a2j/controller/SubscriberController.java +++ b/src/main/java/de/bund/digitalservice/a2j/controller/SubscriberController.java @@ -1,7 +1,7 @@ package de.bund.digitalservice.a2j.controller; import de.bund.digitalservice.a2j.service.subscriber.SubscriberService; -import dev.fitko.fitconnect.api.domain.model.submission.SubmissionForPickup; +import dev.fitko.fitconnect.api.domain.model.callback.NewSubmissionsCallback; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; @@ -16,7 +16,7 @@ public SubscriberController(SubscriberService service) { } @PostMapping("callbacks/fit-connect") - public void newSubmission(@RequestBody SubmissionForPickup submission) { - service.pickUpSubmission(submission); + public void newSubmission(@RequestBody NewSubmissionsCallback callback) { + service.pickUpSubmission(callback.getSubmissions().getFirst()); } }