import request from "@/http/request";

const getConfigs = () => {
    return request.get('/config/getConfigs')
}

const updateConfig = (params) => {
    return request.post('/config/updateConfig', params)
}

const getConfigsByPage = (params) => {
    return request.post('/config/getConfigsByPage', params)
}

const restartSystem = (params) => {
    return request({
        url: '/system/restartSystem',
        method: 'post',
        data: params,
        timeout: 10000
    })
}

const reloadConfig = (params) => {
    return request({
        url: '/system/reloadConfig',
        method: 'post',
        data: params,
        timeout: 10000
    })
}

export {
    getConfigs,
    getConfigsByPage,
    updateConfig,
    restartSystem,
    reloadConfig
}