protect route
This commit is contained in:
@@ -4,12 +4,15 @@ use App\Http\Controllers\Api\FetchLoanHistoryController;
|
||||
use App\Http\Controllers\FetchCardHistoryController;
|
||||
use App\Http\Controllers\MetricsController;
|
||||
use App\Http\Controllers\ProfileController;
|
||||
use App\Http\Middleware\OnlySystemUser;
|
||||
use App\Modules\ApiAuth\Controllers\ApiAuthController;
|
||||
use App\Modules\BaseAppEnum\Controllers\BaseAppEnumController;
|
||||
use App\Modules\Branch\Controllers\BranchController;
|
||||
use App\Modules\LoanOrder\Controllers\LoanOrderController;
|
||||
use App\Modules\Province\Controllers\ProvinceController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Laravel\Nova\Http\Middleware\Authenticate;
|
||||
use Laravel\Nova\Http\Middleware\Authorize;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -22,11 +25,13 @@ use Illuminate\Support\Facades\Route;
|
||||
|
|
||||
*/
|
||||
|
||||
// Fetch card history...
|
||||
Route::post('fetch-card-history', [FetchCardHistoryController::class, 'index']);
|
||||
Route::middleware(['nova', Authenticate::class, Authorize::class, OnlySystemUser::class])->group(function () {
|
||||
// Fetch card history...
|
||||
Route::post('fetch-card-history', [FetchCardHistoryController::class, 'index']);
|
||||
|
||||
// Fetch loan history...
|
||||
Route::post('fetch-loan-history', [FetchLoanHistoryController::class, 'index']);
|
||||
// Fetch loan history...
|
||||
Route::post('fetch-loan-history', [FetchLoanHistoryController::class, 'index']);
|
||||
});
|
||||
|
||||
// Auth...
|
||||
Route::post('auth/register', [ApiAuthController::class, 'register']);
|
||||
|
||||
Reference in New Issue
Block a user