mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-23 11:43:47 -08:00
Fixes #4051 - use delete method for deleting user files
This commit is contained in:
parent
ba8bcce8eb
commit
7fe2a1f802
|
@ -426,7 +426,7 @@
|
|||
</td>
|
||||
<td>
|
||||
@can('update', $user)
|
||||
<a class="btn delete-asset btn-danger btn-sm hidden-print" href="{{ route('delete/userfile', [$user->id, $file->id]) }}" data-content="Are you sure you wish to delete this file?" data-title="Delete {{ $file->filename }}?"><i class="fa fa-trash icon-white"></i></a>
|
||||
<a class="btn delete-asset btn-danger btn-sm hidden-print" href="{{ route('userfile.destroy', [$user->id, $file->id]) }}" data-content="Are you sure you wish to delete this file?" data-title="Delete {{ $file->filename }}?"><i class="fa fa-trash icon-white"></i></a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -13,9 +13,9 @@ Route::group([ 'prefix' => 'users', 'middleware' => ['auth']], function () {
|
|||
Route::get('{userId}/restore', [ 'as' => 'restore/user', 'uses' => 'UsersController@getRestore' ]);
|
||||
Route::get('{userId}/unsuspend', [ 'as' => 'unsuspend/user', 'uses' => 'UsersController@getUnsuspend' ]);
|
||||
Route::post('{userId}/upload', [ 'as' => 'upload/user', 'uses' => 'UsersController@postUpload' ]);
|
||||
Route::get(
|
||||
Route::delete(
|
||||
'{userId}/deletefile/{fileId}',
|
||||
[ 'as' => 'delete/userfile', 'uses' => 'UsersController@getDeleteFile' ]
|
||||
[ 'as' => 'userfile.destroy', 'uses' => 'UsersController@getDeleteFile' ]
|
||||
);
|
||||
Route::get(
|
||||
'{userId}/showfile/{fileId}',
|
||||
|
|
Loading…
Reference in a new issue