diff options
author | 2022-05-29 17:45:54 +0100 | |
---|---|---|
committer | 2022-05-29 17:45:54 +0100 | |
commit | 308d07785f811ff470d0e90b11680926a823027b (patch) | |
tree | 7afe7859fc29f6a5c34be8b7b486cc317cc82e21 /apps/ChangePassword/api.js | |
parent | 50d781d0bdcac217f2bc037abe087a00019edba5 (diff) | |
download | my_apps-308d07785f811ff470d0e90b11680926a823027b.tar.gz my_apps-308d07785f811ff470d0e90b11680926a823027b.tar.bz2 my_apps-308d07785f811ff470d0e90b11680926a823027b.zip |
add change password option
Diffstat (limited to 'apps/ChangePassword/api.js')
-rw-r--r-- | apps/ChangePassword/api.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/ChangePassword/api.js b/apps/ChangePassword/api.js new file mode 100644 index 0000000..ef609a7 --- /dev/null +++ b/apps/ChangePassword/api.js @@ -0,0 +1,9 @@ +import fetchJson from 'helpers/fetchJson' + +export const changePassword = async (data) => ( + await fetchJson('/api/password', { + method: 'POST', + headers: { 'Content-Type': 'plain/text; charset=utf-8' }, + body: JSON.stringify(data) + }) +) |