mirror of
https://github.com/snipe/snipe-it.git
synced 2026-02-05 09:25:26 +00:00
this is pretty much done
This commit is contained in:
@ -164,8 +164,13 @@ class ViewAssetsController extends Controller
|
||||
|
||||
public function destroy(Asset $asset): RedirectResponse
|
||||
{
|
||||
CancelCheckoutRequest::run($asset, auth()->user());
|
||||
return redirect()->route('requestable-assets')->with('success')->with('success', trans('admin/hardware/message.requests.canceled'));
|
||||
try {
|
||||
CancelCheckoutRequest::run($asset, auth()->user());
|
||||
return redirect()->route('requestable-assets')->with('success')->with('success', trans('admin/hardware/message.requests.canceled'));
|
||||
} catch (\Exception $e) {
|
||||
report($e);
|
||||
return redirect()->back()->with('error', 'something bad happened');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user