Add UpdatePassword function to Fetcher.jsx
This commit is contained in:
parent
cb6bbaf9df
commit
fa767d16cb
1 changed files with 9 additions and 0 deletions
|
@ -21,6 +21,14 @@ const signUp = (username, password, displayName, email) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const UpdatePassword = newPassword => {
|
||||||
|
return fetch(`${API_URL}/users/change_password`, {
|
||||||
|
method: 'PUT',
|
||||||
|
headers: HEADERS(),
|
||||||
|
body: JSON.stringify({ password: newPassword }),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const login = (username, password) => {
|
const login = (username, password) => {
|
||||||
return fetch(`${API_URL}/auth/login`, {
|
return fetch(`${API_URL}/auth/login`, {
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -322,6 +330,7 @@ export {
|
||||||
UpdateChoreAssignee,
|
UpdateChoreAssignee,
|
||||||
UpdateChoreHistory,
|
UpdateChoreHistory,
|
||||||
UpdateChorePriority,
|
UpdateChorePriority,
|
||||||
|
UpdatePassword,
|
||||||
UpdateThingState,
|
UpdateThingState,
|
||||||
UpdateUserDetails,
|
UpdateUserDetails,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue