fix: file config

pull/38/head
xingyu 2023-10-26 11:08:19 +08:00
parent 749201996b
commit 36206fcd2b
2 changed files with 2 additions and 8 deletions

View File

@ -46,12 +46,12 @@ export function updateFileConfigMaster(id: number) {
}
// 新增文件配置
export function createFileConfig(data: FileConfigVO) {
export function createFileConfig(data) {
return defHttp.post({ url: '/infra/file-config/create', data })
}
// 修改文件配置
export function updateFileConfig(data: FileConfigVO) {
export function updateFileConfig(data) {
return defHttp.put({ url: '/infra/file-config/update', data })
}

View File

@ -35,12 +35,6 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() {
try {
const values = await validate()
const config: any = {}
for (const item in values) {
if (item.startsWith('config.'))
config[item.substring(7)] = values[item]
}
values.config = config
setModalProps({ confirmLoading: true })
if (unref(isUpdate))
await updateFileConfig(values)