change name
This commit is contained in:
parent
981ed99434
commit
f8752395d4
@ -73,7 +73,7 @@ public class FriendRessources {
|
||||
/// GET
|
||||
@GET
|
||||
@RolesAllowed("Admin")
|
||||
public Response getGroups(@CookieParam("user") String userCookie, @Context SecurityContext ctx,
|
||||
public Response getFriends(@CookieParam("user") String userCookie, @Context SecurityContext ctx,
|
||||
@QueryParam("page") Integer page, @QueryParam("nbPages") Integer nbPages) {
|
||||
if(nbPages == null){
|
||||
nbPages = 20;
|
||||
@ -110,7 +110,7 @@ public class FriendRessources {
|
||||
@GET
|
||||
@RolesAllowed("Admin")
|
||||
@Path("{id}")
|
||||
public Response getSingleGroup(@PathParam("id") String id, @CookieParam("user") String userCookie,
|
||||
public Response getSingleFriend(@PathParam("id") String id, @CookieParam("user") String userCookie,
|
||||
@Context SecurityContext ctx) {
|
||||
UUID kid = UUID.fromString(jwt.getClaim(Claims.kid));
|
||||
UsersEntity user = UsersEntity.findById(kid);
|
||||
@ -155,7 +155,7 @@ public class FriendRessources {
|
||||
@RolesAllowed({"Admin", "User"})
|
||||
@Path("{id}")
|
||||
@Transactional
|
||||
public Response createGroup(@Context SecurityContext ctx, @CookieParam("user") String userCookie, @PathParam("id") String id, FriendEntity friend) {
|
||||
public Response createFriend(@Context SecurityContext ctx, @CookieParam("user") String userCookie, @PathParam("id") String id, FriendEntity friend) {
|
||||
|
||||
UUID kid = UUID.fromString(jwt.getClaim(Claims.kid));
|
||||
UsersEntity user = UsersEntity.findById(kid);
|
||||
@ -179,7 +179,7 @@ public class FriendRessources {
|
||||
@Path("{id}")
|
||||
@RolesAllowed({"Admin", "User"})
|
||||
@Transactional
|
||||
public Response changeStatusSingleGroupToDelete(@Context SecurityContext ctx, @CookieParam("user") String userCookie,
|
||||
public Response changeStatusSingleFriendToDelete(@Context SecurityContext ctx, @CookieParam("user") String userCookie,
|
||||
@PathParam("id") String id) {
|
||||
UUID kid = UUID.fromString(jwt.getClaim(Claims.kid));
|
||||
UsersEntity user = UsersEntity.findById(kid);
|
||||
@ -206,7 +206,7 @@ public class FriendRessources {
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@Transactional
|
||||
@Path("{id}")
|
||||
public Response updateGroup(@Context SecurityContext ctx, @CookieParam("user") String userCookie,
|
||||
public Response updateFriend(@Context SecurityContext ctx, @CookieParam("user") String userCookie,
|
||||
FriendEntity friend, @PathParam("id") String id) {
|
||||
UUID kid = UUID.fromString(jwt.getClaim(Claims.kid));
|
||||
UsersEntity user = UsersEntity.findById(kid);
|
||||
@ -234,8 +234,4 @@ public class FriendRessources {
|
||||
}
|
||||
return Response.status(status).build();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user