change name
This commit is contained in:
parent
efab19818d
commit
b072ad7b70
@ -74,7 +74,7 @@ public class BlacklistRessources {
|
|||||||
/// GET
|
/// GET
|
||||||
@GET
|
@GET
|
||||||
@RolesAllowed("Admin")
|
@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) {
|
@QueryParam("page") Integer page, @QueryParam("nbPages") Integer nbPages) {
|
||||||
if(nbPages == null){
|
if(nbPages == null){
|
||||||
nbPages = 20;
|
nbPages = 20;
|
||||||
@ -111,7 +111,7 @@ public class BlacklistRessources {
|
|||||||
@GET
|
@GET
|
||||||
@RolesAllowed("Admin")
|
@RolesAllowed("Admin")
|
||||||
@Path("{id}")
|
@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) {
|
@Context SecurityContext ctx) {
|
||||||
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);
|
||||||
@ -132,7 +132,7 @@ public class BlacklistRessources {
|
|||||||
@GET
|
@GET
|
||||||
@RolesAllowed("Admin")
|
@RolesAllowed("Admin")
|
||||||
@Path("/user/{id}")
|
@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) {
|
@Context SecurityContext ctx) {
|
||||||
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);
|
||||||
@ -156,7 +156,7 @@ public class BlacklistRessources {
|
|||||||
@RolesAllowed({"Admin", "User"})
|
@RolesAllowed({"Admin", "User"})
|
||||||
@Path("{id}")
|
@Path("{id}")
|
||||||
@Transactional
|
@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));
|
UUID kid = UUID.fromString(jwt.getClaim(Claims.kid));
|
||||||
UsersEntity user = UsersEntity.findById(kid);
|
UsersEntity user = UsersEntity.findById(kid);
|
||||||
@ -180,7 +180,7 @@ public class BlacklistRessources {
|
|||||||
@Path("{id}")
|
@Path("{id}")
|
||||||
@RolesAllowed({"Admin", "User"})
|
@RolesAllowed({"Admin", "User"})
|
||||||
@Transactional
|
@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) {
|
@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);
|
||||||
@ -207,7 +207,7 @@ public class BlacklistRessources {
|
|||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
@Transactional
|
@Transactional
|
||||||
@Path("{id}")
|
@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) {
|
BlacklistEntity blacklist, @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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user