mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-04 23:16:37 +08:00
fix(storage): allow staging local config when S3 is unreachable
When switching storage drivers in admin settings, save now validates connectivity against the selected target backend instead of retesting the still-active driver. The active driver remains unchanged until migration completes, so unreachable MinIO no longer blocks saving local storage settings.
This commit is contained in:
@@ -149,13 +149,8 @@ export function StorageConfigTab() {
|
||||
|
||||
const saveMutation = useMutation({
|
||||
mutationFn: async (value: StorageConfig) => {
|
||||
const activeDriver = query.data?.config.driver || value.driver
|
||||
const valueToSave = {
|
||||
...value,
|
||||
driver: activeDriver,
|
||||
}
|
||||
await services.adminSystemConfig.updateSystemConfig(storageConfigKey, {
|
||||
value: JSON.stringify(valueToSave),
|
||||
value: JSON.stringify(value),
|
||||
})
|
||||
},
|
||||
onSuccess: () => {
|
||||
|
||||
Reference in New Issue
Block a user