From 93512eb6665e7d35660db133319be54ed1c09232 Mon Sep 17 00:00:00 2001 From: Mo Tarbin Date: Mon, 15 Jul 2024 21:58:23 -0400 Subject: Update Chore view --- src/utils/Fetcher.jsx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/utils') 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, } -- cgit