diff --git a/.idea/misc.xml b/.idea/misc.xml index 7e13a7a..5d9e04b 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -4,7 +4,7 @@ - + \ No newline at end of file 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 50e399e..88b692d 100644 --- a/src/main/java/com/example/cosmos_serversb/resources/GroupsRest.java +++ b/src/main/java/com/example/cosmos_serversb/resources/GroupsRest.java @@ -1,8 +1,8 @@ package com.example.cosmos_serversb.resources; -import org.springframework.stereotype.Component; -import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.stereotype.Component; import javax.ws.rs.*; @@ -12,64 +12,88 @@ @GET public String getGroups(String uId) throws JsonProcessingException{ - return null; + ObjectMapper mapper = new ObjectMapper(); + String json = mapper.writeValueAsString(null); + return json; } @POST public String createGroup(String name, String uId) throws JsonProcessingException{ - return null; + ObjectMapper mapper = new ObjectMapper(); + String json = mapper.writeValueAsString(null); + return json; } @Path("/{gId}") @GET public String getGroupInfo(String gId) throws JsonProcessingException{ - return null; + ObjectMapper mapper = new ObjectMapper(); + String json = mapper.writeValueAsString(null); + return json; } @DELETE public String deleteGroup(String gId) throws JsonProcessingException{ - return null; + ObjectMapper mapper = new ObjectMapper(); + String json = mapper.writeValueAsString(null); + return json; } @Path("/members") @GET public String getGroupMembersInfo(String gId) throws JsonProcessingException{ - return null; + ObjectMapper mapper = new ObjectMapper(); + String json = mapper.writeValueAsString(null); + return json; } @POST public String addGroupMembers(String gId, String uId) throws JsonProcessingException{ - return null; + ObjectMapper mapper = new ObjectMapper(); + String json = mapper.writeValueAsString(null); + return json; } @DELETE public String deleteGroupMembers(String gId, String uId) throws JsonProcessingException{ - return null; + ObjectMapper mapper = new ObjectMapper(); + String json = mapper.writeValueAsString(null); + return json; } @Path("/requests") @GET public String getGroupRequestsInfo(String gId) throws JsonProcessingException{ - return null; + 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{ - return null; + ObjectMapper mapper = new ObjectMapper(); + String json = mapper.writeValueAsString(null); + return json; } @Path("/{rId}") @GET public String getGroupRequestInfo(String gId, String rId) throws JsonProcessingException{ - return null; + 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{ - return null; + ObjectMapper mapper = new ObjectMapper(); + String json = mapper.writeValueAsString(null); + return json; } @DELETE public String GroupsInfo(String gId, String rId) throws JsonProcessingException{ - return null; + ObjectMapper mapper = new ObjectMapper(); + String json = mapper.writeValueAsString(null); + return json; } }