Changes to repair API auth

This commit is contained in:
James Cole 2018-02-04 13:41:59 +01:00
parent 58bdf14f6b
commit 1ef28cbc02
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
2 changed files with 4 additions and 4 deletions

View File

@ -50,9 +50,9 @@ class Authenticate
return redirect()->guest('login');
}
if (1 === intval(auth()->user()->blocked)) {
if (1 === intval(Auth::guard($guard)->user()->blocked)) {
$message = strval(trans('firefly.block_account_logout'));
if ('email_changed' === auth()->user()->blocked_code) {
if ('email_changed' === Auth::guard($guard)->user()->blocked_code) {
$message = strval(trans('firefly.email_changed_logout'));
}

View File

@ -65,8 +65,8 @@ class RouteServiceProvider extends ServiceProvider
*/
protected function mapApiRoutes()
{
Route::prefix('api')
->middleware('api')
Route::prefix('api/v1')
->middleware('auth:api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
}