File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -187,16 +187,19 @@ function delete_selected_assets() {
187187 let cid = get_caseid ( ) ;
188188 asset_ids . forEach ( asset_id => {
189189 let url = `/api/v2/cases/${ cid } /assets/${ asset_id } ` ;
190- delete_request_api ( url ) . done ( ( data , textStatus ) => {
191- if ( textStatus === "nocontent" ) {
192- reload_assets ( ) ;
193- notify_success ( `Assets deleted: ${ asset_id } ` ) ;
194- return ;
195- }
196- notify_error ( `Unable to delete asset: ${ asset_id } ` ) ;
197- } ) ;
190+ delete_request_api ( url )
191+ . done ( ( data , textStatus ) => {
192+ if ( textStatus === "nocontent" ) {
193+ reload_assets ( ) ;
194+ notify_success ( `Asset deleted: ${ asset_id } ` ) ;
195+ return ;
196+ }
197+ notify_error ( `Unable to delete asset: ${ asset_id } ` ) ;
198+ } )
199+ . fail ( ( jqXHR , textStatus , errorThrown ) => {
200+ notify_error ( `Unable to delete asset: ${ asset_id } ` ) ;
201+ } )
198202 } ) ;
199- reload_assets ( ) ;
200203 $ ( '#modal_add_asset' ) . modal ( 'hide' ) ;
201204 } )
202205}
You can’t perform that action at this time.
0 commit comments