Handle error case in setup (fixes #723)

This commit is contained in:
Simon
2025-10-03 20:04:40 +02:00
committed by GitHub
+10 -1
View File
@@ -85,6 +85,7 @@ function SetupView() {
initialValues={{username: '', email: '', password: '', passwordRepeat: ''}}
onSubmit={
async (values: any) => {
try {
await SetupEndpoint.registerSuperAdmin({
username: values.username,
password: values.password,
@@ -94,10 +95,18 @@ function SetupView() {
title: "Setup finished",
description: "Have fun with Gameyfin!",
color: "success"
})
});
} catch (e) {
addToast({
title: "Could not register super admin user",
description: "Maybe Gameyfin is already set up?",
color: "warning"
});
} finally {
navigate('/login');
}
}
}
>
<WizardStep icon={<HandWaving/>}>
<WelcomeStep/>