import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { TextinVO, TextinForm } from '@/api/setting/textin/types';

/**
 * 获取 TextIn 配置
 */
export const getTextinConfig = (): AxiosPromise<TextinVO> => {
  return request({
    url: '/setting/textin',
    method: 'get'
  });
};

/**
 * 更新 TextIn 配置
 * @param data
 */
export const updateTextinConfig = (data: TextinForm) => {
  return request({
    url: '/setting/textin',
    method: 'put',
    data: data
  });
};
