Merge pull request #9699 from uberbrady/develop-v6-integration

Basic fixes to at least get the dashboard up
This commit is contained in:
snipe 2021-06-11 15:56:59 -07:00 committed by GitHub
commit ebfb3ed5b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 29 deletions

View file

@ -630,12 +630,12 @@ Route::group(['prefix' => 'v1', 'middleware' => 'auth:api'], function () {
Route::group(['prefix' => 'statuslabels'], function () { Route::group(['prefix' => 'statuslabels'], function () {
// Pie chart for dashboard // Pie chart for dashboard
Route::get('assets', Route::get('assets', [Api\StatuslabelsController::class, 'getAssetCountByStatuslabel']
[ // [
'as' => 'api.statuslabels.assets.bytype', // 'as' => 'api.statuslabels.assets.bytype',
'uses' => [Api\StatuslabelsController::class, 'getAssetCountByStatuslabel'], // 'uses' => [Api\StatuslabelsController::class, 'getAssetCountByStatuslabel'],
] // ]
); )->name('api.statuslabels.assets.bytype');
Route::get('{statuslabel}/assetlist', Route::get('{statuslabel}/assetlist',
[ [
@ -774,9 +774,10 @@ Route::group(['prefix' => 'v1', 'middleware' => 'auth:api'], function () {
); // Users resource ); // Users resource
Route::get( Route::get(
'reports/activity', 'reports/activity',
['as' => 'api.activity.index', 'uses' => [Api\ReportsController::class, 'index']] [Api\ReportsController::class, 'index']
); // ['as' => 'api.activity.index', 'uses' => [Api\ReportsController::class, 'index']]
)->name('api.activity.index');
/*--- Kits API ---*/ /*--- Kits API ---*/

View file

@ -19,6 +19,7 @@ use App\Http\Controllers\SettingsController;
use App\Http\Controllers\StatuslabelsController; use App\Http\Controllers\StatuslabelsController;
use App\Http\Controllers\SuppliersController; use App\Http\Controllers\SuppliersController;
use App\Http\Controllers\ViewAssetsController; use App\Http\Controllers\ViewAssetsController;
use App\Http\Controllers\Auth\LoginController;
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
@ -339,7 +340,7 @@ Route::group(['middleware' => ['auth']], function () {
Route::get( Route::get(
'auth/signin', 'auth/signin',
['uses' => [Auth\LoginController::class, 'legacyAuthRedirect']] ['uses' => [LoginController::class, 'legacyAuthRedirect']]
); );
/* /*
@ -399,7 +400,7 @@ Route::get(
[ [
'as' => 'two-factor-enroll', 'as' => 'two-factor-enroll',
'middleware' => ['web'], 'middleware' => ['web'],
'uses' => [Auth\LoginController::class, 'getTwoFactorEnroll'], ] 'uses' => [LoginController::class, 'getTwoFactorEnroll'], ]
); );
Route::get( Route::get(
@ -407,7 +408,7 @@ Route::get(
[ [
'as' => 'two-factor', 'as' => 'two-factor',
'middleware' => ['web'], 'middleware' => ['web'],
'uses' => [Auth\LoginController::class, 'getTwoFactorAuth'], ] 'uses' => [LoginController::class, 'getTwoFactorAuth'], ]
); );
Route::post( Route::post(
@ -415,7 +416,7 @@ Route::post(
[ [
'as' => 'two-factor', 'as' => 'two-factor',
'middleware' => ['web'], 'middleware' => ['web'],
'uses' => [Auth\LoginController::class, 'postTwoFactorAuth'], ] 'uses' => [LoginController::class, 'postTwoFactorAuth'], ]
); );
@ -423,25 +424,27 @@ Route::post(
Route::group(['middleware' => 'web'], function () { Route::group(['middleware' => 'web'], function () {
Route::get( Route::get(
'login', 'login',
[ [LoginController::class, 'showLoginForm']
'as' => 'login', // [
'middleware' => ['web'], // 'as' => 'login',
'uses' => [Auth\LoginController::class, 'showLoginForm'], ] // 'middleware' => ['web'],
); // 'uses' => [LoginController::class, 'showLoginForm'], ]
)->name("login");
Route::post( Route::post(
'login', 'login',
[ [LoginController::class, 'login']
'as' => 'login', // [
'middleware' => ['web'], // 'as' => 'login',
'uses' => [Auth\LoginController::class, 'login'], ] // 'middleware' => ['web'],
// 'uses' => [LoginController::class, 'login'], ]
); );
Route::get( Route::get(
'logout', 'logout',
[ [
'as' => 'logout', 'as' => 'logout',
'uses' => [Auth\LoginController::class, 'logout'], ] 'uses' => [LoginController::class, 'logout'], ]
); );
}); });
@ -454,10 +457,11 @@ Route::get(
'uses' => [HealthController::class, 'get'],] 'uses' => [HealthController::class, 'get'],]
); );
Route::get( Route::middleware(['auth'])->get(
'/', '/',
[ [DashboardController::class, 'index']
'as' => 'home', // [
'middleware' => ['auth'], // 'as' => 'home',
'uses' => [DashboardController::class, 'index'], ] // 'middleware' => ['auth'],
); // 'uses' => [DashboardController::class, 'index'], ]
)->name('home');