change name

This commit is contained in:
Valentin CZERYBA 2023-01-16 22:25:12 +01:00
parent efab19818d
commit b072ad7b70

View File

@ -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);