diff --git a/wrapper/src/main/java/wekan/wrapper/api/ChecklistService.java b/wrapper/src/main/java/wekan/wrapper/api/ChecklistService.java index 009044a..ca0047d 100644 --- a/wrapper/src/main/java/wekan/wrapper/api/ChecklistService.java +++ b/wrapper/src/main/java/wekan/wrapper/api/ChecklistService.java @@ -5,7 +5,7 @@ import retrofit2.http.*; import wekan.wrapper.entity.Checklist; import wekan.wrapper.entity.ChecklistItem; import wekan.wrapper.entity.ChecklistPrototype; -import wekan.wrapper.entity.TestBody; +import wekan.wrapper.entity.ChecklistItemStatus; import java.util.List; @@ -130,17 +130,17 @@ public interface ChecklistService { * @param cardId The ID of the card * @param checklistId The ID of the checklist * @param itemId The ID of the item - * @param isFinished True if the item is done + * @param itemStatus The status of the item * @return The ID of the checklist item + * @see ChecklistItemStatus */ - @FormUrlEncoded @PUT("/api/boards/{boardId}/cards/{cardId}/checklists/{checklistId}/items/{itemId}") Call editChecklistItem( @Path("boardId") String boardId, @Path("cardId") String cardId, @Path("checklistId") String checklistId, @Path("itemId") String itemId, - @Field("isFinished") boolean isFinished + @Body ChecklistItemStatus itemStatus ); /** @@ -159,13 +159,4 @@ public interface ChecklistService { @Path("checklistId") String checklistId, @Path("itemId") String itemId ); - - @PUT("/api/boards/{boardId}/cards/{cardId}/checklists/{checklistId}/items/{itemId}") - Call editChecklistItem( - @Path("boardId") String boardId, - @Path("cardId") String cardId, - @Path("checklistId") String checklistId, - @Path("itemId") String itemId, - @Body TestBody isFinished - ); } diff --git a/wrapper/src/main/java/wekan/wrapper/entity/TestBody.java b/wrapper/src/main/java/wekan/wrapper/entity/ChecklistItemStatus.java similarity index 55% rename from wrapper/src/main/java/wekan/wrapper/entity/TestBody.java rename to wrapper/src/main/java/wekan/wrapper/entity/ChecklistItemStatus.java index c403f1c..f7f9cdb 100644 --- a/wrapper/src/main/java/wekan/wrapper/entity/TestBody.java +++ b/wrapper/src/main/java/wekan/wrapper/entity/ChecklistItemStatus.java @@ -1,9 +1,9 @@ package wekan.wrapper.entity; -public class TestBody { +public class ChecklistItemStatus { private boolean isFinished; - public TestBody(boolean isFinished) { + public ChecklistItemStatus(boolean isFinished) { this.isFinished = isFinished; } } diff --git a/wrapper/src/test/java/wekan/wrapper/api/ChecklistServiceTest.java b/wrapper/src/test/java/wekan/wrapper/api/ChecklistServiceTest.java index a6ee073..99d9784 100644 --- a/wrapper/src/test/java/wekan/wrapper/api/ChecklistServiceTest.java +++ b/wrapper/src/test/java/wekan/wrapper/api/ChecklistServiceTest.java @@ -229,7 +229,7 @@ public class ChecklistServiceTest { "card id", "checklist id", "item id", - true + new ChecklistItemStatus(true) ) .execute().body();