bulk setting change and image update

This commit is contained in:
Julian Krauser 2025-04-29 13:19:12 +02:00
parent 964af82904
commit be52a51055
3 changed files with 64 additions and 2 deletions

View file

@ -68,11 +68,15 @@ export default abstract class SettingHelper {
/**
* Sets a setting
* undefined value leads to reset of key
* @param key The key of the setting
* @param value The value to set
*/
public static async setSetting<K extends SettingString>(key: K, value: SettingValueMapping[K]): Promise<void> {
if (value === undefined || value === null) return;
if (value === undefined || value === null) {
if (key != "mail.password") this.resetSetting(key);
return;
}
const stringValue = String(value);