[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository has been archived by the owner on Jul 24, 2019. It is now read-only.

Apply fixes from StyleCI #4

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions app/Http/Controllers/AppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@

namespace Laterpost\Http\Controllers;

use Illuminate\Http\Request;

class AppController extends Controller
{

/**
* AppController constructor.
*/
Expand All @@ -15,9 +12,9 @@ public function __construct()
$this->middleware('auth');
}


/**
* Dashboard View
* Dashboard View.
*
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function index()
Expand Down
5 changes: 4 additions & 1 deletion app/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,19 @@ public function twitterCallback(Request $request)
if ((!Auth::check() || Auth::check()) && $user_id !== false) {
Auth::loginUsingId($user_id);
$this->accountService->updateAccount($user, Auth::user()->id);

return redirect('/app');
}

if (Auth::check() && !$user_id) {
$this->accountService->addAccount($user, 'twitter', Auth::user()->id);

return redirect('/app');
}

if(!Auth::check() && !$user_id) {
if (!Auth::check() && !$user_id) {
$request->session()->put(['twitter' => $user]);

return redirect('/auth/signup');
}
}
Expand Down
2 changes: 0 additions & 2 deletions app/Http/Controllers/SettingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace Laterpost\Http\Controllers;

use Illuminate\Http\Request;

class SettingController extends Controller
{
//
Expand Down
1 change: 0 additions & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,5 @@
Route::get('/getstarted', 'Auth\RegisterController@getStarted')->middleware('auth');
Route::post('/auth/signup', 'Auth\RegisterController@registerUser');


Route::get('/app', 'AppController@index');
Route::get('/settings', 'SettingController@index');