fix: storage template onboarding save (#19405)

* fix: storage template onboarding save

* no need for async/await
This commit is contained in:
Brandon Wees 2025-06-22 21:54:29 -05:00 committed by GitHub
parent 4cd633dc68
commit ef278b4fb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,7 +5,7 @@
import { featureFlags } from '$lib/stores/server-config.store'; import { featureFlags } from '$lib/stores/server-config.store';
import { user } from '$lib/stores/user.store'; import { user } from '$lib/stores/user.store';
import { getConfig, type SystemConfigDto } from '@immich/sdk'; import { getConfig, type SystemConfigDto } from '@immich/sdk';
import { onMount } from 'svelte'; import { onDestroy, onMount } from 'svelte';
let config: SystemConfigDto | undefined = $state(); let config: SystemConfigDto | undefined = $state();
let adminSettingsComponent = $state<ReturnType<typeof AdminSettings>>(); let adminSettingsComponent = $state<ReturnType<typeof AdminSettings>>();
@ -14,9 +14,7 @@
config = await getConfig(); config = await getConfig();
}); });
export const save = async () => { onDestroy(() => adminSettingsComponent?.handleSave({ storageTemplate: config?.storageTemplate }));
await adminSettingsComponent?.handleSave({ storageTemplate: config?.storageTemplate });
};
</script> </script>
<div class="flex flex-col"> <div class="flex flex-col">