refactor: refs #8944 deleted useless try catch

This commit is contained in:
Jon Elias 2025-05-12 10:29:16 +02:00
parent 5523362175
commit 81c5f78751
1 changed files with 5 additions and 13 deletions

View File

@ -227,23 +227,15 @@ const onDataSaved = () => {
async function saveData(data, getChanges) {
const changes = getChanges();
if (changes?.updates?.length) {
try {
for (const change of changes.updates) {
const row = data.find((row) => row.id === change.where.id);
await axios.patch('FixedPrices/upsertFixedPrice', row);
}
} catch (error) {
throw error;
for (const change of changes.updates) {
const row = data.find((row) => row.id === change.where.id);
await axios.patch('FixedPrices/upsertFixedPrice', row);
}
}
if (data?.deletes?.length) {
try {
for (const deleteItem of data.deletes) {
await axios.delete(`FixedPrices/${deleteItem}`);
}
} catch (error) {
throw error;
for (const deleteItem of data.deletes) {
await axios.delete(`FixedPrices/${deleteItem}`);
}
}
tableRef.value.reload();