mirror of
https://github.com/flarum/framework.git
synced 2024-12-13 23:53:42 +08:00
Update ForgotAction to comply with changes in base class
This commit is contained in:
parent
a773970956
commit
ee8e30910b
|
@ -35,7 +35,7 @@ abstract class JsonApiAction implements ActionInterface
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function json($data, $status = 200)
|
protected function json($data = null, $status = 200)
|
||||||
{
|
{
|
||||||
if ($data === null) $data = new \ArrayObject();
|
if ($data === null) $data = new \ArrayObject();
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ use Flarum\Api\Request;
|
||||||
use Flarum\Api\Actions\JsonApiAction;
|
use Flarum\Api\Actions\JsonApiAction;
|
||||||
use Flarum\Core\Repositories\UserRepositoryInterface;
|
use Flarum\Core\Repositories\UserRepositoryInterface;
|
||||||
use Flarum\Core\Commands\RequestPasswordResetCommand;
|
use Flarum\Core\Commands\RequestPasswordResetCommand;
|
||||||
use Illuminate\Http\Response;
|
|
||||||
use Illuminate\Contracts\Bus\Dispatcher;
|
use Illuminate\Contracts\Bus\Dispatcher;
|
||||||
|
|
||||||
class ForgotAction extends JsonApiAction
|
class ForgotAction extends JsonApiAction
|
||||||
|
@ -23,7 +22,7 @@ class ForgotAction extends JsonApiAction
|
||||||
* Log in and return a token.
|
* Log in and return a token.
|
||||||
*
|
*
|
||||||
* @param \Flarum\Api\Request $request
|
* @param \Flarum\Api\Request $request
|
||||||
* @return \Flarum\Api\Response
|
* @return \Psr\Http\Message\ResponseInterface
|
||||||
*/
|
*/
|
||||||
public function respond(Request $request)
|
public function respond(Request $request)
|
||||||
{
|
{
|
||||||
|
@ -33,6 +32,6 @@ class ForgotAction extends JsonApiAction
|
||||||
new RequestPasswordResetCommand($email)
|
new RequestPasswordResetCommand($email)
|
||||||
);
|
);
|
||||||
|
|
||||||
return new Response;
|
return $this->json();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user