From 4383ed3b7c32cdc502617c8de7e991c05a92499e Mon Sep 17 00:00:00 2001 From: vitor Date: Tue, 9 Feb 2021 18:24:42 -0300 Subject: [PATCH] refs #4 --- pom.xml | 6 ++++++ .../api/v1/profile/controller/ProfileController.java | 2 -- .../org/ayty/hatcher/api/v1/profile/dto/ProfileDTO.java | 3 +-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 0782b47..b398270 100644 --- a/pom.xml +++ b/pom.xml @@ -84,6 +84,12 @@ jjwt 0.9.1 + + + javax.validation + validation-api + 2.0.1.Final + diff --git a/src/main/java/org/ayty/hatcher/api/v1/profile/controller/ProfileController.java b/src/main/java/org/ayty/hatcher/api/v1/profile/controller/ProfileController.java index ac005c4..b48a50a 100644 --- a/src/main/java/org/ayty/hatcher/api/v1/profile/controller/ProfileController.java +++ b/src/main/java/org/ayty/hatcher/api/v1/profile/controller/ProfileController.java @@ -28,12 +28,10 @@ public class ProfileController { public Profile getProfile(@PathVariable("id") long id) throws NotFoundException { return findService.findById(id); } - @PutMapping("/{id}") public Profile updateProfile(@PathVariable("id") long id,@RequestBody Profile profile) throws NotFoundException{ return updateService.updateProfile(id, profile); } - @DeleteMapping("/{id}") public void deleteProfile(@PathVariable("id") long id) { deleteService.deleteProfile(id); diff --git a/src/main/java/org/ayty/hatcher/api/v1/profile/dto/ProfileDTO.java b/src/main/java/org/ayty/hatcher/api/v1/profile/dto/ProfileDTO.java index d8c3fbb..d66579c 100644 --- a/src/main/java/org/ayty/hatcher/api/v1/profile/dto/ProfileDTO.java +++ b/src/main/java/org/ayty/hatcher/api/v1/profile/dto/ProfileDTO.java @@ -17,8 +17,7 @@ @Data @Builder public class ProfileDTO { - @NotBlank() - private long id; + //private Course course; @NotBlank(message = "Campo deve ter no minimo 10") @Size(min=10,max=1000)