bulk setting change and image update
This commit is contained in:
parent
964af82904
commit
be52a51055
3 changed files with 64 additions and 2 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue