fix: admin users were created while the setup wizard wasn't finished
This commit is contained in:
@@ -112,15 +112,7 @@ const AdminConfigTable = () => {
|
||||
<Group position="right">
|
||||
<Button
|
||||
onClick={() => {
|
||||
if (config.get("SETUP_FINISHED")) {
|
||||
configService
|
||||
.updateMany(updatedConfigVariables)
|
||||
.then(() => {
|
||||
updatedConfigVariables = [];
|
||||
toast.success("Configurations updated successfully");
|
||||
})
|
||||
.catch(toast.axiosError);
|
||||
} else {
|
||||
if (config.get("SETUP_STATUS") == "REGISTERED") {
|
||||
configService
|
||||
.updateMany(updatedConfigVariables)
|
||||
.then(async () => {
|
||||
@@ -128,6 +120,14 @@ const AdminConfigTable = () => {
|
||||
window.location.reload();
|
||||
})
|
||||
.catch(toast.axiosError);
|
||||
} else {
|
||||
configService
|
||||
.updateMany(updatedConfigVariables)
|
||||
.then(() => {
|
||||
updatedConfigVariables = [];
|
||||
toast.success("Configurations updated successfully");
|
||||
})
|
||||
.catch(toast.axiosError);
|
||||
}
|
||||
}}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user