From 02c6612f7e614b99bb901db33c07e57f37ce8e5b Mon Sep 17 00:00:00 2001 From: gustavofg1pontes Date: Mon, 7 Oct 2024 20:21:27 -0300 Subject: [PATCH] fix: return status 200 on webhook --- .../tickets/infra/api/controllers/EnrollmentController.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/infrastructure/src/main/java/br/com/ifsp/tickets/infra/api/controllers/EnrollmentController.java b/infrastructure/src/main/java/br/com/ifsp/tickets/infra/api/controllers/EnrollmentController.java index 8325188..724b862 100644 --- a/infrastructure/src/main/java/br/com/ifsp/tickets/infra/api/controllers/EnrollmentController.java +++ b/infrastructure/src/main/java/br/com/ifsp/tickets/infra/api/controllers/EnrollmentController.java @@ -36,7 +36,6 @@ public class EnrollmentController implements EnrollmentAPI { private final EnrollmentService enrollmentService; private final PaymentService paymentService; - private final AuthService authService; @Override public ResponseEntity create(CreateEnrollmentRequest request) { @@ -104,6 +103,6 @@ public ResponseEntity webhook(CreatePaymentRequest request) { output.ticketID() ); CreateEnrollmentOutput out = this.enrollmentService.create(input); - return ResponseEntity.created(URI.create("/v1/enrollment/" + out.enrollmentId())).build(); + return ResponseEntity.ok().build(); } }