refactoring

This commit is contained in:
Milos Stojanovic
2019-06-14 13:34:21 +02:00
parent fa319eda36
commit b945526c85
8 changed files with 20 additions and 42 deletions

View File

@@ -67,10 +67,6 @@ class AuthController
return $response->json($errors->firstOfAll(), 422);
}
if ($auth->user() === null) {
return $response->json(['oldpassword' => 'Wrong password'], 422);
}
if (! $auth->authenticate($auth->user()->getUsername(), $request->input('oldpassword'))) {
return $response->json(['oldpassword' => 'Wrong password'], 422);
}