From b072ad7b70a672779235218c8f803359a3cccec1 Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Mon, 16 Jan 2023 22:25:12 +0100 Subject: [PATCH] change name --- .../com/covas/Resources/BlacklistRessources.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/covas/Resources/BlacklistRessources.java b/src/main/java/com/covas/Resources/BlacklistRessources.java index d250db5..12ff241 100644 --- a/src/main/java/com/covas/Resources/BlacklistRessources.java +++ b/src/main/java/com/covas/Resources/BlacklistRessources.java @@ -74,7 +74,7 @@ public class BlacklistRessources { /// GET @GET @RolesAllowed("Admin") - public Response getFriends(@CookieParam("user") String userCookie, @Context SecurityContext ctx, + public Response getBlacklist(@CookieParam("user") String userCookie, @Context SecurityContext ctx, @QueryParam("page") Integer page, @QueryParam("nbPages") Integer nbPages) { if(nbPages == null){ nbPages = 20; @@ -111,7 +111,7 @@ public class BlacklistRessources { @GET @RolesAllowed("Admin") @Path("{id}") - public Response getSingleFriend(@PathParam("id") String id, @CookieParam("user") String userCookie, + public Response getSingleBlacklist(@PathParam("id") String id, @CookieParam("user") String userCookie, @Context SecurityContext ctx) { UUID kid = UUID.fromString(jwt.getClaim(Claims.kid)); UsersEntity user = UsersEntity.findById(kid); @@ -132,7 +132,7 @@ public class BlacklistRessources { @GET @RolesAllowed("Admin") @Path("/user/{id}") - public Response getSingleFriendbyOwner(@PathParam("id") String id, @CookieParam("user") String userCookie, + public Response getSingleBlacklistbyOwner(@PathParam("id") String id, @CookieParam("user") String userCookie, @Context SecurityContext ctx) { UUID kid = UUID.fromString(jwt.getClaim(Claims.kid)); UsersEntity user = UsersEntity.findById(kid); @@ -156,7 +156,7 @@ public class BlacklistRessources { @RolesAllowed({"Admin", "User"}) @Path("{id}") @Transactional - public Response createFriend(@Context SecurityContext ctx, @CookieParam("user") String userCookie, @PathParam("id") String id, BlacklistEntity blacklist) { + public Response createBlacklist(@Context SecurityContext ctx, @CookieParam("user") String userCookie, @PathParam("id") String id, BlacklistEntity blacklist) { UUID kid = UUID.fromString(jwt.getClaim(Claims.kid)); UsersEntity user = UsersEntity.findById(kid); @@ -180,7 +180,7 @@ public class BlacklistRessources { @Path("{id}") @RolesAllowed({"Admin", "User"}) @Transactional - public Response changeStatusSingleFriendToDelete(@Context SecurityContext ctx, @CookieParam("user") String userCookie, + public Response changeStatusSingleBlacklistToDelete(@Context SecurityContext ctx, @CookieParam("user") String userCookie, @PathParam("id") String id) { UUID kid = UUID.fromString(jwt.getClaim(Claims.kid)); UsersEntity user = UsersEntity.findById(kid); @@ -207,7 +207,7 @@ public class BlacklistRessources { @Consumes(MediaType.APPLICATION_JSON) @Transactional @Path("{id}") - public Response updateFriend(@Context SecurityContext ctx, @CookieParam("user") String userCookie, + public Response updateBlacklist(@Context SecurityContext ctx, @CookieParam("user") String userCookie, BlacklistEntity blacklist, @PathParam("id") String id) { UUID kid = UUID.fromString(jwt.getClaim(Claims.kid)); UsersEntity user = UsersEntity.findById(kid);