refs #5835 upsert refactor
gitea/salix-front/pipeline/head This commit looks good Details

This commit is contained in:
Jorge Penadés 2023-11-23 08:42:09 +01:00
parent dfddde1d5c
commit d97f694563
1 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ async function upsert() {
formData.append(dms.value.files[i].name, dms.value.files[i]);
dms.value.hasFileAttached = true;
}
const url = !isEdit ? 'Dms/uploadFile' : `dms/${dms.value.id}/updateFile`;
const url = isEdit ? `dms/${dms.value.id}/updateFile` : 'Dms/uploadFile';
const { data } = await axios.post(url, formData, {
params: dms.value,
});
@ -111,7 +111,7 @@ async function upsert() {
if (!isEdit) {
createDmsRef.value.hide();
} else if (isEdit) {
} else {
editDmsRef.value.hide();
}