import {
  AddSettingsParams,
  BaseResult,
  GetSettingsParams,
  SettingsData,
} from '@models';
import {request} from './request';

const BASE_URL = '/adjustment';

/** 上传配置信息 */
export function addSetting(data: AddSettingsParams): BaseResult {
  return request({
    url: `${BASE_URL}/addTableAdjustment`,
    method: 'POST',
    data,
  });
}

/** 获取配置信息 */
export function getSettings(data: GetSettingsParams): BaseResult<SettingsData> {
  return request({
    url: `${BASE_URL}/getTableAdjustment`,
    data,
    method: 'GET',
    skipError: true,
  });
}
