add PATCH and fix variable

This commit is contained in:
Valentin CZERYBA 2022-08-07 00:15:13 +02:00
parent be11abbd9f
commit 3a70c5e767
3 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@ public class ApplicationLifeCycle {
LOGGER.info("Robert80 user is created"); LOGGER.info("Robert80 user is created");
UsersEntity.add("robert80", "robert80@gmail.com", "titi", "robert", LocalDate.of(1990, Month.JANUARY, 23), "toto", "User"); UsersEntity.add("robert80", "robert80@gmail.com", "titi", "robert", LocalDate.of(1990, Month.JANUARY, 23), "toto", "User");
LOGGER.info("Peter93 user is created"); 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 { } else {
LOGGER.info("DB init wassn't created"); LOGGER.info("DB init wassn't created");
} }

View File

@ -364,7 +364,7 @@ public class UsersRessources {
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Transactional @Transactional
@Path("enable/{id}") @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)); UUID kid = UUID.fromString(jwt.getClaim(Claims.kid));
UsersEntity user = UsersEntity.findById(kid); UsersEntity user = UsersEntity.findById(kid);
Response.Status status = getResponseCheck(ctx, userCookie, user); Response.Status status = getResponseCheck(ctx, userCookie, user);

View File

@ -29,6 +29,6 @@ quarkus.redis.hosts=redis://redis:6379
quarkus.http.cors=true quarkus.http.cors=true
quarkus.http.origins=http://localhost:8084 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.headers=accept,authorization,content-type,x-requested-with,x-foobar
quarkus.http.cors.access-control-allow-credentials=true quarkus.http.cors.access-control-allow-credentials=true