protect route

This commit is contained in:
2024-11-06 13:52:18 +05:00
parent ab9bc6a270
commit 564fe508bf
6 changed files with 167 additions and 30 deletions

View File

@@ -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']);