aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/Fetcher.jsx
diff options
context:
space:
mode:
authorLibravatar Mo Tarbin <mhed.t91@gmail.com>2024-07-06 02:33:06 -0400
committerLibravatar Mo Tarbin <mhed.t91@gmail.com>2024-07-06 02:33:06 -0400
commit9a07689dfeb736341b4f1b378e0ec758ea9cd0ff (patch)
tree0fe096809a9cc6baaa0052c091a3a60766274224 /src/utils/Fetcher.jsx
parentc34da50c8c1564c9c6556522bf12a93639c1f160 (diff)
downloaddonetick-frontend-9a07689dfeb736341b4f1b378e0ec758ea9cd0ff.tar.gz
donetick-frontend-9a07689dfeb736341b4f1b378e0ec758ea9cd0ff.tar.bz2
donetick-frontend-9a07689dfeb736341b4f1b378e0ec758ea9cd0ff.zip
feat: Add NFC tag writing functionality to ChoreCard component, Add Email to sign up
Diffstat (limited to 'src/utils/Fetcher.jsx')
-rw-r--r--src/utils/Fetcher.jsx15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/utils/Fetcher.jsx b/src/utils/Fetcher.jsx
index be3971c..0acc91f 100644
--- a/src/utils/Fetcher.jsx
+++ b/src/utils/Fetcher.jsx
@@ -51,6 +51,19 @@ const GetChoreByID = id => {
headers: HEADERS(),
})
}
+const GetChoreDetailById = id => {
+ return Fetch(`${API_URL}/chores/${id}/details`, {
+ method: 'GET',
+ headers: HEADERS(),
+ })
+}
+
+const MarkChoreComplete = id => {
+ return Fetch(`${API_URL}/chores/${id}/do`, {
+ method: 'POST',
+ headers: HEADERS(),
+ })
+}
const CreateChore = chore => {
return Fetch(`${API_URL}/chores/`, {
method: 'POST',
@@ -238,6 +251,7 @@ export {
GetAllCircleMembers,
GetAllUsers,
GetChoreByID,
+ GetChoreDetailById,
GetChoreHistory,
GetChores,
GetCircleMemberRequests,
@@ -250,6 +264,7 @@ export {
JoinCircle,
LeaveCircle,
login,
+ MarkChoreComplete,
SaveChore,
SaveThing,
signUp,