aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
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,
}