Skip to content

Commit

Permalink
Merge pull request #6 from ueberfuhr-trainings/feature/void-return
Browse files Browse the repository at this point in the history
Let `deleteCustomer()` return `void`
  • Loading branch information
ueberfuhr authored Aug 27, 2024
2 parents 391019f + f79989b commit 1eae85a
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,11 @@ public Response createCustomer(CustomerDto customer) {

@DELETE
@Path("/{uuid}")
public Response deleteCustomer(@PathParam("uuid") UUID uuid) {
public void deleteCustomer(@PathParam("uuid") UUID uuid) {
final var deletedCustomer = customers.remove(uuid);
if (null == deletedCustomer) {
throw new NotFoundException();
}
return Response
.noContent()
.build();
}

}

0 comments on commit 1eae85a

Please sign in to comment.