summaryrefslogtreecommitdiff
path: root/ui/lib/apiServer.js
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2024-10-29 23:29:22 -0400
committerOwen Jacobson <owen@grimoire.ca>2024-10-29 23:29:22 -0400
commit66d3fcf2e22f057bacce8d97d43a13c1c5a9ad09 (patch)
tree60995943e14a6568cf2b37622ce97df121865a6d /ui/lib/apiServer.js
parente328d33fc7d6a0f2e3d260d8bddee3ef633318eb (diff)
Add `change password` UI + API.
The protocol here re-checks the caller's password, as a "I left myself logged in" anti-pranking check.
Diffstat (limited to 'ui/lib/apiServer.js')
-rw-r--r--ui/lib/apiServer.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/lib/apiServer.js b/ui/lib/apiServer.js
index db554e2..19dcf60 100644
--- a/ui/lib/apiServer.js
+++ b/ui/lib/apiServer.js
@@ -30,6 +30,10 @@ export async function logOut() {
return apiServer.post('/auth/logout', {});
}
+export async function changePassword(password, to) {
+ return apiServer.post('/password', { password, to });
+}
+
export async function createChannel(name) {
return apiServer.post('/channels', { name });
}