Skip to content

Commit 29b4b4c

Browse files
committed
DRY
1 parent 07ff630 commit 29b4b4c

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

resources/js/components/assets/Browser/Browser.vue

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -659,11 +659,6 @@ export default {
659659
this.$refs.listing.refresh();
660660
},
661661
662-
actionFailed(response = {}) {
663-
this.$toast.error(response.message || __('Action failed'));
664-
this.$refs.listing.refresh();
665-
},
666-
667662
assetSaved() {
668663
this.loadAssets();
669664
},
@@ -1090,7 +1085,7 @@ export default {
10901085
10911086
if (resolutionResult.success === false) {
10921087
this.moveConflictPolicy = null;
1093-
this.actionFailed(resolutionResult);
1088+
this.actionCompleted(false, resolutionResult);
10941089
return;
10951090
}
10961091
@@ -1124,7 +1119,7 @@ export default {
11241119
11251120
if (response.conflict?.type !== 'asset_move') {
11261121
this.moveConflictPolicy = null;
1127-
this.actionFailed(response);
1122+
this.actionCompleted(false, response);
11281123
return;
11291124
}
11301125
@@ -1144,7 +1139,7 @@ export default {
11441139
11451140
if (!currentConflictAssetId) {
11461141
this.moveConflictPolicy = null;
1147-
this.actionFailed(response);
1142+
this.actionCompleted(false, response);
11481143
return;
11491144
}
11501145

0 commit comments

Comments
 (0)