mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Changes to repair API auth
This commit is contained in:
parent
58bdf14f6b
commit
1ef28cbc02
@ -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'));
|
||||
}
|
||||
|
||||
|
@ -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'));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user