aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorLibravatar Mo Tarbin <mhed.t91@gmail.com>2024-09-06 01:22:55 -0400
committerLibravatar Mo Tarbin <mhed.t91@gmail.com>2024-09-06 01:22:55 -0400
commit2d2cf6d378d92aac31b3b09506bc6310466a0b07 (patch)
treea06c0135171256e9f28512dc840976615e802675 /src/utils
parentc35801d00fef528a87d226ed9e48cd3ba7856c50 (diff)
parent240633177cc646e6662f27e1334b5e83d962170d (diff)
downloaddonetick-frontend-2d2cf6d378d92aac31b3b09506bc6310466a0b07.tar.gz
donetick-frontend-2d2cf6d378d92aac31b3b09506bc6310466a0b07.tar.bz2
donetick-frontend-2d2cf6d378d92aac31b3b09506bc6310466a0b07.zip
- Add Cookie Permission component
- Add Filter button instead of chips in mychores view - show except days instead of showing evenything when days.length>4
Diffstat (limited to '')
-rw-r--r--src/utils/Fetcher.jsx10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/utils/Fetcher.jsx b/src/utils/Fetcher.jsx
index 17b6cd9..5b3bbd9 100644
--- a/src/utils/Fetcher.jsx
+++ b/src/utils/Fetcher.jsx
@@ -83,6 +83,15 @@ const SkipChore = id => {
body: JSON.stringify({}),
})
}
+
+const UpdateChoreAssignee = (id, assignee) => {
+ return Fetch(`${API_URL}/chores/${id}/assignee`, {
+ method: 'PUT',
+ headers: HEADERS(),
+ body: JSON.stringify({ assignee:Number(assignee) }),
+ })
+}
+
const CreateChore = chore => {
return Fetch(`${API_URL}/chores/`, {
method: 'POST',
@@ -306,4 +315,5 @@ export {
UpdateChoreHistory,
UpdateThingState,
UpdateUserDetails,
+ UpdateChoreAssignee,
}