import {configData} from "@/api/system/config";

export async function getSysConfig(name) {
  const config = await configData({name});
  switch (config.type) {
    case 'json':
      config.valueData = JSON.parse(config.value);
      break
    case 'int':
      config.valueData = parseInt(config.value)
      break;
    default:
      config.valueData = config.value;
  }
  return config;
}
