aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/Fetcher.jsx
diff options
context:
space:
mode:
authorLibravatar Mo Tarbin <mhed.t91@gmail.com>2024-07-20 03:41:23 -0400
committerLibravatar Mo Tarbin <mhed.t91@gmail.com>2024-07-20 03:41:23 -0400
commitcb4fcc82f2c5e42b50390e9271e360f1ef95c126 (patch)
tree7cd9c284ced7db3c9e9e8d351ee6fde9e45bf012 /src/utils/Fetcher.jsx
parentdff0ae504ac7c1cc4e3b45c4e316d5a0d55e75c3 (diff)
parent90efb5be001393134aaef07fe11e9ad605692043 (diff)
downloaddonetick-frontend-cb4fcc82f2c5e42b50390e9271e360f1ef95c126.tar.gz
donetick-frontend-cb4fcc82f2c5e42b50390e9271e360f1ef95c126.tar.bz2
donetick-frontend-cb4fcc82f2c5e42b50390e9271e360f1ef95c126.zip
Merge branch 'dev'
Diffstat (limited to 'src/utils/Fetcher.jsx')
-rw-r--r--src/utils/Fetcher.jsx16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/utils/Fetcher.jsx b/src/utils/Fetcher.jsx
index 1161543..17b6cd9 100644
--- a/src/utils/Fetcher.jsx
+++ b/src/utils/Fetcher.jsx
@@ -112,6 +112,20 @@ const GetChoreHistory = choreId => {
headers: HEADERS(),
})
}
+const DeleteChoreHistory = (choreId, id) => {
+ return Fetch(`${API_URL}/chores/${choreId}/history/${id}`, {
+ method: 'DELETE',
+ headers: HEADERS(),
+ })
+}
+
+const UpdateChoreHistory = (choreId, id, choreHistory) => {
+ return Fetch(`${API_URL}/chores/${choreId}/history/${id}`, {
+ method: 'PUT',
+ headers: HEADERS(),
+ body: JSON.stringify(choreHistory),
+ })
+}
const GetAllCircleMembers = () => {
return Fetch(`${API_URL}/circles/members`, {
@@ -264,6 +278,7 @@ export {
CreateLongLiveToken,
CreateThing,
DeleteChore,
+ DeleteChoreHistory,
DeleteCircleMember,
DeleteLongLiveToken,
DeleteThing,
@@ -288,6 +303,7 @@ export {
SaveThing,
signUp,
SkipChore,
+ UpdateChoreHistory,
UpdateThingState,
UpdateUserDetails,
}