aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorLibravatar Mo Tarbin <mhed.t91@gmail.com>2024-07-16 19:37:59 -0400
committerLibravatar Mo Tarbin <mhed.t91@gmail.com>2024-07-16 19:37:59 -0400
commit8e42e59a80fbb4009e6d871d998793ffa597802a (patch)
tree36278fab2f16b148b86b2760dfb19d8e138e1d4d /src/utils
parentc684bdb9ece99935c4c5f3a3eb81787cc2a0ef19 (diff)
parent7f4e5928492a71135f6817874461c80a0ecc155c (diff)
downloaddonetick-frontend-8e42e59a80fbb4009e6d871d998793ffa597802a.tar.gz
donetick-frontend-8e42e59a80fbb4009e6d871d998793ffa597802a.tar.bz2
donetick-frontend-8e42e59a80fbb4009e6d871d998793ffa597802a.zip
Merge branch 'dev'
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,
}