Add notification target update functionality

This commit is contained in:
Mo Tarbin 2024-12-14 02:11:59 -05:00
parent 36638b3a9d
commit aff432b74a
3 changed files with 132 additions and 64 deletions

View file

@ -225,6 +225,14 @@ const UpdateUserDetails = userDetails => {
})
}
const UpdateNotificationTarget = notificationTarget => {
return Fetch(`${API_URL}/users/targets`, {
method: 'PUT',
headers: HEADERS(),
body: JSON.stringify(notificationTarget),
})
}
const GetSubscriptionSession = () => {
return Fetch(API_URL + `/payments/create-subscription`, {
method: 'GET',
@ -373,6 +381,7 @@ export {
UpdateChoreHistory,
UpdateChorePriority,
UpdateLabel,
UpdateNotificationTarget,
UpdatePassword,
UpdateThingState,
UpdateUserDetails,