diff --git a/app/src/main/java/com/example/cosmosclient/resources/GroupsRest.java b/app/src/main/java/com/example/cosmosclient/resources/GroupsRest.java index fea1711..adfd574 100644 --- a/app/src/main/java/com/example/cosmosclient/resources/GroupsRest.java +++ b/app/src/main/java/com/example/cosmosclient/resources/GroupsRest.java @@ -16,6 +16,7 @@ import retrofit2.http.FormUrlEncoded; import retrofit2.http.GET; import retrofit2.http.POST; +import retrofit2.http.PUT; import retrofit2.http.Path; import retrofit2.http.Query; @@ -25,13 +26,17 @@ @FormUrlEncoded Call createGroup(@Field("name") String name, @Field("uId") String uId, @Field("token") String token); - @GET("groups/{gId}/requests") - Call getRequestsListByGid(@Path("gId") String gId, @Query("token") String token, @Query("detail") boolean detail, @Query("quantity") int quantity); - @POST("groups/{gId}/requests") @FormUrlEncoded Call addRequests(@Path("gId") String gId, @Field("uId") String uId, @Field("product") String product, @Field("deadline") String deadline, @Field("location") int location, @Field("token") String token); + @GET("groups/{gId}/requests") + Call getRequestsListByGid(@Path("gId") String gId, @Query("token") String token, @Query("detail") boolean detail, @Query("quantity") int quantity); + + @PUT("groups/{gId}/requests/{rId}") + @FormUrlEncoded + Call updateRequest(@Path("gId") String gId, @Path("rId") String rId, @Field("uId") String uId, @Field("product") String product, @Field("deadline") String deadline, @Field("location") int location, @Field("done") boolean done, @Field("token") String token); + // @GET("{gId}/requests/{rId}") // Call getRequestsDetailByGidAndRid(@Path("gid") String gid, @Path("rid") String rid, @Query("token") String token);