Skip to content
This repository was archived by the owner on Aug 27, 2024. It is now read-only.

Commit be98449

Browse files
author
DenisGostroushko
committed
update signature of ResetPasswordApiController::sendResetResponse method
1 parent 254f877 commit be98449

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

CHANGES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changes History
22

3+
3.3.2
4+
-----
5+
- Update the signature of the Saritasa\LaravelControllers\Api\ResetPasswordApiController::sendResetResponse method
6+
to match the new signature of the Illuminate\Foundation\Auth\ResetsPasswords trait
7+
- Update the response of the Saritasa\LaravelControllers\Api\ResetPasswordApiController::sendResetFailedResponse method
8+
to display message instead of message token
9+
310
3.3.1
411
-----
512
- Update the signature of the Saritasa\LaravelControllers\Api\ForgotPasswordApiController::sendResetLinkResponse method

src/Api/ResetPasswordApiController.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ class ResetPasswordApiController extends BaseApiController
2323
/**
2424
* Get the response for a successful password reset.
2525
*
26+
* @param Request $request HTTP Request instance
2627
* @param string $response ID of language resource to use as response
2728
*
2829
* @return Response
2930
*/
30-
protected function sendResetResponse(string $response): Response
31+
protected function sendResetResponse(Request $request, string $response): Response
3132
{
3233
return $this->json(new SuccessMessage(trans($response)));
3334
}
@@ -42,7 +43,7 @@ protected function sendResetResponse(string $response): Response
4243
*/
4344
protected function sendResetFailedResponse(Request $request, $message): Response
4445
{
45-
return $this->json(new ErrorMessage($message));
46+
return $this->json(new ErrorMessage(trans($message)));
4647
}
4748

4849
/**

0 commit comments

Comments
 (0)