From f6018542cdeff9c86d9040004e34270b8c40f08f Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Mon, 9 Jan 2023 22:10:48 +0100 Subject: [PATCH] change name function for comment resources --- .../com/covas/Resources/CommentRessources.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/covas/Resources/CommentRessources.java b/src/main/java/com/covas/Resources/CommentRessources.java index b988191..c6e608f 100644 --- a/src/main/java/com/covas/Resources/CommentRessources.java +++ b/src/main/java/com/covas/Resources/CommentRessources.java @@ -70,7 +70,7 @@ public class CommentRessources { /// GET @GET @RolesAllowed("Admin") - public Response getPublishers(@CookieParam("user") String userCookie, @Context SecurityContext ctx, + public Response getComments(@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 CommentRessources { @GET @RolesAllowed("Admin") @Path("{id}") - public Response getSinglePublisher(@PathParam("id") String id, @CookieParam("user") String userCookie, + public Response getSingleComment(@PathParam("id") String id, @CookieParam("user") String userCookie, @Context SecurityContext ctx) { UUID kid = UUID.fromString(jwt.getClaim(Claims.kid)); UsersEntity user = UsersEntity.findById(kid); @@ -147,7 +147,7 @@ public class CommentRessources { @RolesAllowed({"Admin", "User"}) @Path("{id}") @Transactional - public Response createPublisher(@Context SecurityContext ctx, @CookieParam("user") String userCookie, @PathParam("id") String id, CommentEntity comment) { + public Response createComment(@Context SecurityContext ctx, @CookieParam("user") String userCookie, @PathParam("id") String id, CommentEntity comment) { UUID kid = UUID.fromString(jwt.getClaim(Claims.kid)); UsersEntity user = UsersEntity.findById(kid); @@ -176,7 +176,7 @@ public class CommentRessources { @Path("{id}") @RolesAllowed({"Admin", "User"}) @Transactional - public Response changeStatusSinglePublisherToDelete(@Context SecurityContext ctx, @CookieParam("user") String userCookie, + public Response changeStatusSingleCommentToDelete(@Context SecurityContext ctx, @CookieParam("user") String userCookie, @PathParam("id") String id) { UUID kid = UUID.fromString(jwt.getClaim(Claims.kid)); UsersEntity user = UsersEntity.findById(kid); @@ -202,7 +202,7 @@ public class CommentRessources { @Path("/disable/{id}") @RolesAllowed({"Admin", "User"}) @Transactional - public Response changeStatusSinglePublisherToDisable(@Context SecurityContext ctx, @CookieParam("user") String userCookie, + public Response changeStatusSingleCommentToDisable(@Context SecurityContext ctx, @CookieParam("user") String userCookie, @PathParam("id") String id) { UUID kid = UUID.fromString(jwt.getClaim(Claims.kid)); UsersEntity user = UsersEntity.findById(kid); @@ -230,7 +230,7 @@ public class CommentRessources { @Consumes(MediaType.APPLICATION_JSON) @Transactional @Path("{id}") - public Response updatePublisherAdmin(@Context SecurityContext ctx, @CookieParam("user") String userCookie, + public Response updateCommentAdmin(@Context SecurityContext ctx, @CookieParam("user") String userCookie, CommentEntity comment, @PathParam("id") String id) { UUID kid = UUID.fromString(jwt.getClaim(Claims.kid)); UsersEntity user = UsersEntity.findById(kid); @@ -267,7 +267,7 @@ public class CommentRessources { @Consumes(MediaType.APPLICATION_JSON) @Transactional @Path("enable/{id}") - public Response enableUserAdmin(@Context SecurityContext ctx, @CookieParam("user") String userCookie, @PathParam("id") String id) { + public Response enableCommentAdmin(@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);