Change email handling and logout function
This commit is contained in:
parent
ca0c35bf82
commit
fce394f6bd
6 changed files with 18 additions and 42 deletions
|
@ -40,7 +40,7 @@ class AccountController extends ClientApiController
|
|||
/**
|
||||
* Update the authenticated user's email address if their password matches.
|
||||
*
|
||||
* @param UpdateEmailRequest $request
|
||||
* @param \Pterodactyl\Http\Requests\Api\Client\Account\UpdateEmailRequest $request
|
||||
* @return array
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
|
@ -48,9 +48,7 @@ class AccountController extends ClientApiController
|
|||
*/
|
||||
public function updateEmail(UpdateEmailRequest $request): array
|
||||
{
|
||||
$updated = $this->updateService->handle($request->user(), [
|
||||
'email' => $request->input('email'),
|
||||
]);
|
||||
$updated = $this->updateService->handle($request->user(), $request->validated());
|
||||
|
||||
return $this->fractal->item($updated->get('model'))
|
||||
->transformWith($this->getTransformer(AccountTransformer::class))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue