provide setting endbpoints

This commit is contained in:
Julian Krauser 2025-04-20 16:15:27 +02:00
parent a8edc19f34
commit 7aa9038a61
11 changed files with 137 additions and 13 deletions

View file

@ -1,7 +1,7 @@
import { SettingString, settingsType, SettingTopic, SettingTypeAtom, SettingValueMapping } from "../type/settingTypes";
import { CodingHelper } from "./codingHelper";
import SettingCommandHandler from "../command/settingCommandHandler";
import SettingService from "../service/settingService";
import SettingCommandHandler from "../command/management/setting/settingCommandHandler";
import SettingService from "../service/management/settingService";
import { APPLICATION_SECRET } from "../env.defaults";
import {
BooleanConverter,
@ -12,6 +12,7 @@ import {
TypeConverter,
UrlConverter,
} from "./convertHelper";
import cloneDeep from "lodash.clonedeep";
export default abstract class SettingHelper {
private static settings: { [key in SettingString]?: string } = {};
@ -28,6 +29,10 @@ export default abstract class SettingHelper {
ms: new MsConverter(),
};
public static getAllSettings() {
return cloneDeep(this.settings);
}
/**
* Returns the value of a setting with the correct type based on the key
* @param key The key of the setting