Skip to content

Commit

Permalink
✨ Added frontend and backend validation forgot and reset password
Browse files Browse the repository at this point in the history
  • Loading branch information
cesaramirez committed Dec 25, 2017
1 parent ab38ad7 commit dc42b7a
Show file tree
Hide file tree
Showing 8 changed files with 175 additions and 254 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ protected function sendResetLinkResponse($response)
*/
protected function sendResetLinkFailedResponse(Request $request, $response)
{
return response()->json(['email' => trans($response)], 400);
return response()->json([
'errors' => [
'email' => [
trans($response)],
],
], 400);
}
}
8 changes: 7 additions & 1 deletion app/Http/Controllers/API/V1/Auth/ResetPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords;
use Illuminate\Http\Request;

class ResetPasswordController extends Controller
{
Expand Down Expand Up @@ -57,6 +58,11 @@ protected function sendResetResponse($response)
*/
protected function sendResetFailedResponse(Request $request, $response)
{
return response()->json(['email' => trans($response)], 400);
return response()->json([
'errors' => [
'email' => [
trans($response)],
],
], 400);
}
}
Loading

0 comments on commit dc42b7a

Please sign in to comment.