aboutsummaryrefslogtreecommitdiff
path: root/static/api
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2025-11-24 15:55:20 +0100
committerNathan Reiner <nathan@nathanreiner.xyz>2025-11-24 15:55:20 +0100
commit4b6e37397d3a9a80db0c20484b712175c7b9c9c7 (patch)
treea741d76d250b7e7a53f3ab6715106463db32215e /static/api
parenta72a9c6fa8aacbd9e945fdce64bdaf7895425e95 (diff)
add password-dialog
Diffstat (limited to 'static/api')
-rw-r--r--static/api/profile.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/static/api/profile.js b/static/api/profile.js
index ec633e0..d6acd16 100644
--- a/static/api/profile.js
+++ b/static/api/profile.js
@@ -6,3 +6,10 @@ export async function set(name, birthday) {
birthday: birthday,
});
}
+
+export function update_password(old, next) {
+ return rest.post('/api/profile/update-password', {
+ current_password: old,
+ new_password: next,
+ }).then(r => r.success);
+}