import request from '../utils/request'

const api = {
  List: '/Admin/System/RuntimeConfig',
  Save: '/Admin/System/RuntimeConfig',
  Select: '/Admin/System/RuntimeConfig/Select'
}

export function getRuntimeConfigs() {
  return request({ url: api.List, method: 'get' })
}

export function saveRuntimeConfig(config) {
  return request({ url: api.Save, method: 'put', data: { config } })
}

export function selectRuntimeConfig(key, name) {
  return request({ url: api.Select, method: 'put', data: { key, name } })
}
