add ChecklistItemStatus
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

Use ChecklistItemStatus to avoid #12
This commit is contained in:
Raffaele Mignone 2019-11-15 16:14:39 +01:00
parent 9ce3629bbc
commit cf59f3b325
Signed by: norangebit
GPG Key ID: F5255658CB220573
3 changed files with 7 additions and 16 deletions

View File

@ -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<ChecklistItem> 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<ChecklistItem> editChecklistItem(
@Path("boardId") String boardId,
@Path("cardId") String cardId,
@Path("checklistId") String checklistId,
@Path("itemId") String itemId,
@Body TestBody isFinished
);
}

View File

@ -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;
}
}

View File

@ -229,7 +229,7 @@ public class ChecklistServiceTest {
"card id",
"checklist id",
"item id",
true
new ChecklistItemStatus(true)
)
.execute().body();