fix(settings): streamline settings type creation in settingsService and initialization

- Refactored settingsService to use findOrCreate for settings type, improving efficiency and error handling.
- Added initialization for 'account' settings type in initializeSettings, ensuring all necessary settings are created during setup.
This commit is contained in:
Torsten Schulz (local)
2026-03-27 10:43:44 +01:00
parent cf6d72385e
commit 0dd2bce5d1
2 changed files with 8 additions and 6 deletions

View File

@@ -17,10 +17,14 @@ const initializeSettings = async () => {
where: { name: 'flirt' },
defaults: { name: 'flirt' }
});
await SettingsType.findOrCreate({
where: { name: 'account' },
defaults: { name: 'account' }
});
await SettingsType.findOrCreate({
where: { name: 'languageAssistant' },
defaults: { name: 'languageAssistant' }
});
};
export default initializeSettings;
export default initializeSettings;