Skip to content

Commit

Permalink
fix complete adding not null contract
Browse files Browse the repository at this point in the history
  • Loading branch information
manuraf committed Feb 23, 2024
1 parent d9d22fd commit 947c9e1
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import it.pagopa.selfcare.onboarding.service.OnboardingService;
import jakarta.inject.Inject;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.Context;
import jakarta.ws.rs.core.MediaType;
Expand Down Expand Up @@ -157,7 +158,7 @@ private Uni<String> readUserIdFromToken(SecurityContext ctx) {
@PUT
@Path("/{onboardingId}/complete")
@Consumes(MediaType.MULTIPART_FORM_DATA)
public Uni<Response> complete(@PathParam(value = "onboardingId") String onboardingId, @RestForm("contract") File file) {
public Uni<Response> complete(@PathParam(value = "onboardingId") String onboardingId, @NotNull @RestForm("contract") File file) {
return onboardingService.complete(onboardingId, file)
.map(ignore -> Response
.status(HttpStatus.SC_NO_CONTENT)
Expand All @@ -169,7 +170,7 @@ public Uni<Response> complete(@PathParam(value = "onboardingId") String onboardi
@PUT
@Path("/{onboardingId}/consume")
@Consumes(MediaType.MULTIPART_FORM_DATA)
public Uni<Response> consume(@PathParam(value = "onboardingId") String onboardingId, @RestForm("contract") File file) {
public Uni<Response> consume(@PathParam(value = "onboardingId") String onboardingId, @NotNull @RestForm("contract") File file) {
return onboardingService.completeWithoutSignatureVerification(onboardingId, file)
.map(ignore -> Response
.status(HttpStatus.SC_NO_CONTENT)
Expand Down

0 comments on commit 947c9e1

Please sign in to comment.