import type {IConfigSearch} from "@/interface/page/config/IConfigSearch.ts";
import axiosInstance from "@/api/axios.ts";
import type {IAppConfigTable} from "@/model/table/IAppConfigTable.ts";

export class ConfigApi {

    // 网页查询配置信息
    static queryConfig(searchData: IConfigSearch) {
        return axiosInstance.post("/app/config/queryConfig", searchData);
    };

    // 更新配置信息
    static updateConfig(config: IAppConfigTable) {
        return axiosInstance.post("/app/config/updateConfig", config);
    };

    // 重载配置
    static reloadConfig() {
        return axiosInstance.put("/app/config/reloadConfig");
    };

    // 获取配置信息
    static getConfig(configKey?: string) {
        return axiosInstance.get("/app/system/queryConfigValue/" + configKey);
    };


}