diff --git a/src/main/java/com/pixels/services/PixelService.java b/src/main/java/com/pixels/services/PixelService.java index db7f12f..d2ca227 100644 --- a/src/main/java/com/pixels/services/PixelService.java +++ b/src/main/java/com/pixels/services/PixelService.java @@ -92,7 +92,7 @@ public class PixelService { @Path("{id}/modify/") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) public void modify(@PathParam("id") Long id, @CookieParam("JSESSIONID") Cookie cookie, - @FormParam("red") int red, @FormParam("green") int green, @FormParam("blue") int blue,@FormParam("color") String color, + @FormParam("color") String color, @FormParam("price") int price, @FormParam("description") String description) { // on récupère le pixel de la db via son id Pixel pixel = em.find(Pixel.class, id); @@ -103,7 +103,7 @@ public class PixelService { if (user.equals(pixel.getOwner())) { pixel.setPrice(price); pixel.setDescription(description); - //pixel.setColor(String.format("%02X%02X%02X", red, green, blue)); + String colorDisplay = color.substring(1,color.length()); pixel.setColor(colorDisplay); diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 7de0f11..cbdd4d5 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -10,8 +10,6 @@ - -
@@ -141,48 +139,12 @@ required /> - -