Dev #1
No files matched your search
Generated
+2744
File diff suppressed because it is too large.
Load diff
@@ -179,7 +179,7 @@ export const SharedListsView: React.FC<SharedListsViewProps> = ({ onRefreshGloba
|
||||
})
|
||||
);
|
||||
|
||||
await api.toggleListItem(activeList.id, item.id);
|
||||
await api.toggleListItem(activeList.id, item.id, nextCompleted);
|
||||
onRefreshGlobal();
|
||||
};
|
||||
|
||||
|
||||
@@ -487,7 +487,7 @@ export const api = {
|
||||
});
|
||||
},
|
||||
|
||||
async toggleListItem(listId: string, itemId: string, isCompleted: boolean): Promise<ListItem> {
|
||||
async toggleListItem(listId: string, itemId: string, isCompleted?: boolean): Promise<ListItem> {
|
||||
return request<ListItem>(`/api/v1/lists/${listId}/items/${itemId}`, {
|
||||
method: 'PATCH',
|
||||
body: JSON.stringify({ isCompleted }),
|
||||
|
||||
Reference in new issue
Block a user