fix: the webui does not allow to disable the last admin now.
Release / release (push) Failing after 4s
Release / release (push) Failing after 4s
This commit is contained in:
1 parent
5fff009320
commit
ff0c93ed73
10 files changed
+46
-15
No files matched your search
@@ -97,16 +97,19 @@ export default function UsersPanel() {
|
||||
void refresh()
|
||||
}, [refresh])
|
||||
|
||||
/** Runs a change of a user, then reads the list again; a failure is shown above the list. */
|
||||
/** Runs a change of a user, then reads the list again; a failure is shown above the list after the reading. */
|
||||
async function change(work: () => Promise<unknown>) {
|
||||
setBusy(true)
|
||||
let failure: string | null = null
|
||||
try {
|
||||
await work()
|
||||
setError(null)
|
||||
} catch (caught) {
|
||||
setError((caught as Error).message)
|
||||
failure = (caught as Error).message
|
||||
}
|
||||
await refresh()
|
||||
if (failure !== null) {
|
||||
setError(failure)
|
||||
}
|
||||
}
|
||||
|
||||
async function download(name: string) {
|
||||
|
||||
Reference in new issue
Block a user