diff --git a/src/main/java/com/example/cosmos_serversb/resources/GroupsRest.java b/src/main/java/com/example/cosmos_serversb/resources/GroupsRest.java index 88b692d..48668ad 100644 --- a/src/main/java/com/example/cosmos_serversb/resources/GroupsRest.java +++ b/src/main/java/com/example/cosmos_serversb/resources/GroupsRest.java @@ -11,14 +11,14 @@ public class GroupsRest { @GET - public String getGroups(String uId) throws JsonProcessingException{ + public String getGroupsListByUid(String uId, String token) throws JsonProcessingException{ ObjectMapper mapper = new ObjectMapper(); String json = mapper.writeValueAsString(null); return json; } @POST - public String createGroup(String name, String uId) throws JsonProcessingException{ + public String createGroup(String name, String uId, String token) throws JsonProcessingException{ ObjectMapper mapper = new ObjectMapper(); String json = mapper.writeValueAsString(null); return json; @@ -26,14 +26,14 @@ @Path("/{gId}") @GET - public String getGroupInfo(String gId) throws JsonProcessingException{ + public String getGroupInfoByGid(String gId, String token) throws JsonProcessingException{ ObjectMapper mapper = new ObjectMapper(); String json = mapper.writeValueAsString(null); return json; } @DELETE - public String deleteGroup(String gId) throws JsonProcessingException{ + public String deleteGroup(String gId, String token) throws JsonProcessingException{ ObjectMapper mapper = new ObjectMapper(); String json = mapper.writeValueAsString(null); return json; @@ -41,21 +41,21 @@ @Path("/members") @GET - public String getGroupMembersInfo(String gId) throws JsonProcessingException{ + public String getGroupMembersListByGid(String gId, String token) throws JsonProcessingException{ ObjectMapper mapper = new ObjectMapper(); String json = mapper.writeValueAsString(null); return json; } @POST - public String addGroupMembers(String gId, String uId) throws JsonProcessingException{ + public String addMember(String gId, String uId, String token) throws JsonProcessingException{ ObjectMapper mapper = new ObjectMapper(); String json = mapper.writeValueAsString(null); return json; } @DELETE - public String deleteGroupMembers(String gId, String uId) throws JsonProcessingException{ + public String deleteMember(String gId, String uId, String token) throws JsonProcessingException{ ObjectMapper mapper = new ObjectMapper(); String json = mapper.writeValueAsString(null); return json; @@ -63,14 +63,14 @@ @Path("/requests") @GET - public String getGroupRequestsInfo(String gId) throws JsonProcessingException{ + public String getRequestsListByGid(String gId, String token) throws JsonProcessingException{ ObjectMapper mapper = new ObjectMapper(); String json = mapper.writeValueAsString(null); return json; } @POST - public String createGroupRequests(String gId, String uId, String product, String deadline, int location) throws JsonProcessingException{ + public String addRequests(String gId, String uId, String product, String deadline, int location, String token) throws JsonProcessingException{ ObjectMapper mapper = new ObjectMapper(); String json = mapper.writeValueAsString(null); return json; @@ -78,20 +78,20 @@ @Path("/{rId}") @GET - public String getGroupRequestInfo(String gId, String rId) throws JsonProcessingException{ + public String getRequestsDetailByGidAndRid(String gId, String rId, String token) throws JsonProcessingException{ ObjectMapper mapper = new ObjectMapper(); String json = mapper.writeValueAsString(null); return json; } @PUT - public String changeGroupRequest(String gId, String rId, String uId, String product, String deadline, int location, boolean done) throws JsonProcessingException{ + public String updateRequest(String gId, String rId, String uId, String product, String deadline, int location, boolean done, String token) throws JsonProcessingException{ ObjectMapper mapper = new ObjectMapper(); String json = mapper.writeValueAsString(null); return json; } @DELETE - public String GroupsInfo(String gId, String rId) throws JsonProcessingException{ + public String deleteRequest(String gId, String rId, String token) throws JsonProcessingException{ ObjectMapper mapper = new ObjectMapper(); String json = mapper.writeValueAsString(null); return json;