Skip to content

Commit

Permalink
Merge branch 'master' of github.com:junelsolis/medicoffice
Browse files Browse the repository at this point in the history
  • Loading branch information
junelsolis committed Sep 14, 2019
2 parents 3483442 + c8c4ae8 commit 3d88fe3
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion galeno-app/app/Http/Controllers/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function main()

public function switcher()
{
return redirect('/app/' . auth()->user()->roles()->first()->name);
return redirect('/app/'.auth()->user()->roles()->first()->name);
}

public function login(Request $request)
Expand Down
4 changes: 1 addition & 3 deletions galeno-app/app/Http/Middleware/CheckForMultirole.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ class CheckForMultirole
*/
public function handle($request, Closure $next)
{


$user = auth()->user();

if ($user->roles->count() > 1) {
return redirect('/app/switcher');
}
}

return $next($request);

Expand Down
2 changes: 0 additions & 2 deletions galeno-app/tests/Feature/LoginControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ class LoginControllerTest extends TestCase
{
use RefreshDatabase;


/** @test */
public function it_shows_the_login_page()
{
$this->get('/')->assertViewIs('main');

}

/** @test */
Expand Down
1 change: 0 additions & 1 deletion galeno-app/tests/Unit/PatientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use App\Patient;
use App\User;
use Facades\Tests\Arrangements\CreateUser;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;

Expand Down

0 comments on commit 3d88fe3

Please sign in to comment.