From db45de5da276a227d0f35703d154806730f4aec3 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 15 Nov 2021 20:26:07 -0800 Subject: [PATCH] Fixed old style user routes Signed-off-by: snipe --- routes/web/users.php | 47 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/routes/web/users.php b/routes/web/users.php index 48e5e44142de..bc6cd32c6761 100644 --- a/routes/web/users.php +++ b/routes/web/users.php @@ -1,17 +1,50 @@ 'Users\UsersController@postCreate' ]); - Route::post('{userId}/restore', [ 'as' => 'restore/user', 'uses' => 'Users\UsersController@getRestore' ]); - Route::get('{userId}/unsuspend', [ 'as' => 'unsuspend/user', 'uses' => 'Users\UsersController@getUnsuspend' ]); - Route::post('{userId}/upload', [ 'as' => 'upload/user', 'uses' => 'Users\UserFilesController@store' ]); + // User Management + Route::post( + '{userId}/clone', + [ + Users\UsersController::class, + 'postCreate' + ] + ); + + Route::post( + '{userId}/restore', + [ + Users\UsersController::class, + 'getRestore' + ] + )->name('restore/user'); + + Route::get( + '{userId}/unsuspend', + [ + Users\UsersController::class, + 'getUnsuspend' + ] + )->name('unsuspend/user'); + + Route::post( + '{userId}/upload', + [ + Users\UserFilesController::class, + 'store' + ] + )->name('upload/user'); + Route::delete( '{userId}/deletefile/{fileId}', - [ 'as' => 'userfile.destroy', 'uses' => 'Users\UserFilesController@destroy' ] - ); + [ + Users\UserFilesController::class, + 'destroy' + ] + )->name('userfile.destroy'); + Route::group(['prefix' => 'users', 'middleware' => ['auth']], function () {