mirror of
https://github.com/koel/koel
synced 2024-12-22 10:33:16 +00:00
21 lines
595 B
PHP
21 lines
595 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Http\Controllers\API;
|
||
|
|
||
|
use App\Http\Controllers\Controller;
|
||
|
use App\Http\Requests\API\ResetPasswordRequest;
|
||
|
use App\Services\AuthenticationService;
|
||
|
use Illuminate\Http\Response;
|
||
|
|
||
|
class ResetPasswordController extends Controller
|
||
|
{
|
||
|
public function __invoke(ResetPasswordRequest $request, AuthenticationService $auth)
|
||
|
{
|
||
|
static::disableInDemo();
|
||
|
|
||
|
return $auth->tryResetPasswordUsingBroker($request->email, $request->password, $request->token)
|
||
|
? response()->noContent()
|
||
|
: response('', Response::HTTP_UNPROCESSABLE_ENTITY);
|
||
|
}
|
||
|
}
|