import request from '@/utils/request';
import { AppSettingVO, AppSettingForm } from './types';
import { AxiosPromise } from 'axios';

/**
 * 获取APP配置详情
 * @param id 配置ID
 */
export function getAppSetting(id: number | string): AxiosPromise<AppSettingVO> {
  return request({
    url: `/system/appSetting/${id}`,
    method: 'get'
  });
}

/**
 * 修改APP配置
 * @param data 配置数据
 */
export function updateAppSetting(data: AppSettingForm): AxiosPromise<void> {
  return request({
    url: '/system/appSetting/edit',
    method: 'put',
    data: data
  });
}
