From 1e990820d13f77a30d912d848adfd4dc391a242f Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Sun, 15 Jan 2023 20:44:21 +0100 Subject: [PATCH] change name for group resources --- .../com/covas/Resources/GroupRessources.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/covas/Resources/GroupRessources.java b/src/main/java/com/covas/Resources/GroupRessources.java index 7b8d118..9b61b86 100644 --- a/src/main/java/com/covas/Resources/GroupRessources.java +++ b/src/main/java/com/covas/Resources/GroupRessources.java @@ -72,7 +72,7 @@ public class GroupRessources { /// GET @GET @RolesAllowed("Admin") - public Response getEvents(@CookieParam("user") String userCookie, @Context SecurityContext ctx, + public Response getGroups(@CookieParam("user") String userCookie, @Context SecurityContext ctx, @QueryParam("page") Integer page, @QueryParam("nbPages") Integer nbPages, @QueryParam("status") Short status, @QueryParam("search") String search, @@ -122,7 +122,7 @@ public class GroupRessources { @GET @RolesAllowed("Admin") @Path("{id}") - public Response getSingleEvent(@PathParam("id") String id, @CookieParam("user") String userCookie, + public Response getSingleGroup(@PathParam("id") String id, @CookieParam("user") String userCookie, @Context SecurityContext ctx) { UUID kid = UUID.fromString(jwt.getClaim(Claims.kid)); UsersEntity user = UsersEntity.findById(kid); @@ -146,7 +146,7 @@ public class GroupRessources { @RolesAllowed({"Admin", "User"}) @Path("{id}") @Transactional - public Response createEvent(@Context SecurityContext ctx, @CookieParam("user") String userCookie, @PathParam("id") String id, GroupEntity group) { + public Response createGroup(@Context SecurityContext ctx, @CookieParam("user") String userCookie, @PathParam("id") String id, GroupEntity group) { UUID kid = UUID.fromString(jwt.getClaim(Claims.kid)); UsersEntity user = UsersEntity.findById(kid); @@ -170,7 +170,7 @@ public class GroupRessources { @Path("{id}") @RolesAllowed({"Admin", "User"}) @Transactional - public Response changeStatusSingleEventToDelete(@Context SecurityContext ctx, @CookieParam("user") String userCookie, + public Response changeStatusSingleGroupToDelete(@Context SecurityContext ctx, @CookieParam("user") String userCookie, @PathParam("id") String id) { UUID kid = UUID.fromString(jwt.getClaim(Claims.kid)); UsersEntity user = UsersEntity.findById(kid); @@ -193,7 +193,7 @@ public class GroupRessources { @Path("/disable/{id}") @RolesAllowed({"Admin", "User"}) @Transactional - public Response changeStatusSingleEventToDisable(@Context SecurityContext ctx, @CookieParam("user") String userCookie, + public Response changeStatusSingleGroupToDisable(@Context SecurityContext ctx, @CookieParam("user") String userCookie, @PathParam("id") String id) { UUID kid = UUID.fromString(jwt.getClaim(Claims.kid)); UsersEntity user = UsersEntity.findById(kid); @@ -218,7 +218,7 @@ public class GroupRessources { @Consumes(MediaType.APPLICATION_JSON) @Transactional @Path("{id}") - public Response updateEvent(@Context SecurityContext ctx, @CookieParam("user") String userCookie, + public Response updateGroup(@Context SecurityContext ctx, @CookieParam("user") String userCookie, GroupEntity group, @PathParam("id") String id) { UUID kid = UUID.fromString(jwt.getClaim(Claims.kid)); UsersEntity user = UsersEntity.findById(kid); @@ -253,7 +253,7 @@ public class GroupRessources { @Consumes(MediaType.APPLICATION_JSON) @Transactional @Path("enable/{id}") - public Response enableEvent(@Context SecurityContext ctx, @CookieParam("user") String userCookie, @PathParam("id") String id) { + public Response enableGroup(@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); @@ -269,4 +269,4 @@ public class GroupRessources { } return Response.status(status).build(); } -} +} \ No newline at end of file