Change the returns to be API appropriate

This commit is contained in:
Scarzy 2024-05-01 18:46:39 +01:00
parent f6a1a76095
commit f5791c79a5

View file

@ -179,10 +179,10 @@ class AssetFilesController extends Controller
}
$log->delete();
return redirect()->back()->with('success', trans('admin/hardware/message.deletefile.success'));
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.deletefile.success')), 200);
}
return redirect()->back()->with('success', trans('admin/hardware/message.deletefile.success'));
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.deletefile.success')), 200);
}
// Redirect to the hardware management page