diff --git a/src/main/java/com/covas/ApplicationScoped/ApplicationLifeCycle.java b/src/main/java/com/covas/ApplicationScoped/ApplicationLifeCycle.java index d617bf8..f0fd3bb 100644 --- a/src/main/java/com/covas/ApplicationScoped/ApplicationLifeCycle.java +++ b/src/main/java/com/covas/ApplicationScoped/ApplicationLifeCycle.java @@ -35,7 +35,7 @@ public class ApplicationLifeCycle { LOGGER.info("Robert80 user is created"); UsersEntity.add("robert80", "robert80@gmail.com", "titi", "robert", LocalDate.of(1990, Month.JANUARY, 23), "toto", "User"); LOGGER.info("Peter93 user is created"); - UsersEntity.add("peter93", "valcze80@gmail.com", "yollo", "peter", LocalDate.of(1993, Month.FEBRUARY, 26), "toto", "Admin"); + UsersEntity.add("peter93", "valcze80@gmail.com", "yollo", "peter", LocalDate.of(1993, Month.FEBRUARY, 26), "toto", "Admin"); } else { LOGGER.info("DB init wassn't created"); } diff --git a/src/main/java/com/covas/Resources/UsersRessources.java b/src/main/java/com/covas/Resources/UsersRessources.java index 47c2f9b..122fe7d 100644 --- a/src/main/java/com/covas/Resources/UsersRessources.java +++ b/src/main/java/com/covas/Resources/UsersRessources.java @@ -364,7 +364,7 @@ public class UsersRessources { @Consumes(MediaType.APPLICATION_JSON) @Transactional @Path("enable/{id}") - public Response enableUserAdmin(@Context SecurityContext ctx, @CookieParam("user") String userCookie, @QueryParam("id") String id) { + public Response enableUserAdmin(@Context SecurityContext ctx, @CookieParam("user") String userCookie, @PathParam("id") String id) { UUID kid = UUID.fromString(jwt.getClaim(Claims.kid)); UsersEntity user = UsersEntity.findById(kid); Response.Status status = getResponseCheck(ctx, userCookie, user); diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index edaf415..8af1028 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -29,6 +29,6 @@ quarkus.redis.hosts=redis://redis:6379 quarkus.http.cors=true quarkus.http.origins=http://localhost:8084 -quarkus.http.cors.methods=GET,PUT,POST,DELETE +quarkus.http.cors.methods=GET,PUT,POST,DELETE,PATCH quarkus.http.cors.headers=accept,authorization,content-type,x-requested-with,x-foobar quarkus.http.cors.access-control-allow-credentials=true \ No newline at end of file