From 553d821fc8a677d6e6cdda564b23335cf1eacaa7 Mon Sep 17 00:00:00 2001 From: Jonas Bengtsson Date: Sat, 19 Sep 2026 11:08:16 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20Add=20client=20password=20reset?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/Clients.tsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/frontend/src/pages/Clients.tsx b/frontend/src/pages/Clients.tsx index 6f1b1c6..e890de5 100644 --- a/frontend/src/pages/Clients.tsx +++ b/frontend/src/pages/Clients.tsx @@ -103,6 +103,13 @@ export function ClientsPage() { onError: (e: Error) => setError(e.message), }); + const resetPassword = useMutation({ + mutationFn: (username: string) => + api.post(`/mqtt/clients/${username}/password:reset`), + onSuccess: (result) => setOncePassword(result), + onError: (e: Error) => setError(e.message), + }); + const assignRole = useMutation({ mutationFn: ({ username, rolename }: { username: string; rolename: string }) => assignClientRole(username, rolename), @@ -266,6 +273,18 @@ export function ClientsPage() { ) : ( )}{" "} + {" "}