Skip to content

Commit

Permalink
update settings object
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Werfling committed May 28, 2024
1 parent 60feaf1 commit 3a64f8c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions backend/src/inc/Settings/Settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ export class Settings {
public static readonly BLACKLIST_IPLOCATE_DEFAULT = '';

/**
* getSetting
* @param name
* @param vdefault
* Get setting by name
* @param {string} name
* @param {string} vdefault
* @returns {string}
*/
public static async getSetting(name: string, vdefault: string): Promise<string> {
const setting = await SettingServiceDB.getInstance().findByName(name);
Expand All @@ -38,9 +39,9 @@ export class Settings {
}

/**
* setSetting
* @param name
* @param value
* Set setting by name
* @param {string} name
* @param {string} value
*/
public static async setSetting(name: string, value: string): Promise<void> {
let setting = await SettingServiceDB.getInstance().findByName(name);
Expand All @@ -52,7 +53,7 @@ export class Settings {

setting.value = value;

await await SettingServiceDB.getInstance().save(setting);
await SettingServiceDB.getInstance().save(setting);
}

}

0 comments on commit 3a64f8c

Please sign in to comment.