aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorLibravatar Mo Tarbin <mhed.t91@gmail.com>2024-07-15 21:58:23 -0400
committerLibravatar Mo Tarbin <mhed.t91@gmail.com>2024-07-16 01:58:23 -0400
commit93512eb6665e7d35660db133319be54ed1c09232 (patch)
tree302713f07ccba50de202d1ffc44fee47ac2fad91 /src/utils
parent7a490116b70894ce00e71c7dd0c9dc71f8b72a5a (diff)
downloaddonetick-frontend-93512eb6665e7d35660db133319be54ed1c09232.tar.gz
donetick-frontend-93512eb6665e7d35660db133319be54ed1c09232.tar.bz2
donetick-frontend-93512eb6665e7d35660db133319be54ed1c09232.zip
Update Chore view
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/Fetcher.jsx11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/utils/Fetcher.jsx b/src/utils/Fetcher.jsx
index afa9235..1161543 100644
--- a/src/utils/Fetcher.jsx
+++ b/src/utils/Fetcher.jsx
@@ -73,6 +73,16 @@ const MarkChoreComplete = (id, note, completedDate) => {
body: JSON.stringify(body),
})
}
+
+const SkipChore = id => {
+ return Fetch(`${API_URL}/chores/${id}/skip`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify({}),
+ })
+}
const CreateChore = chore => {
return Fetch(`${API_URL}/chores/`, {
method: 'POST',
@@ -277,6 +287,7 @@ export {
SaveChore,
SaveThing,
signUp,
+ SkipChore,
UpdateThingState,
UpdateUserDetails,
}