From: Cyperghost Date: Thu, 28 Nov 2024 11:40:46 +0000 (+0100) Subject: Only GET for this form is required X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7cb6012b932ae62504579341ceebec5c2fa832c4;p=GitHub%2FWoltLab%2FWCF.git Only GET for this form is required --- diff --git a/wcfsetup/install/files/lib/action/UserCoverPhotoAction.class.php b/wcfsetup/install/files/lib/action/UserCoverPhotoAction.class.php index 134b84bf37..a490f391fb 100644 --- a/wcfsetup/install/files/lib/action/UserCoverPhotoAction.class.php +++ b/wcfsetup/install/files/lib/action/UserCoverPhotoAction.class.php @@ -2,7 +2,6 @@ namespace wcf\action; -use Laminas\Diactoros\Response\JsonResponse; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Server\RequestHandlerInterface; @@ -56,21 +55,6 @@ final class UserCoverPhotoAction implements RequestHandlerInterface if ($request->getMethod() === 'GET') { return $form->toResponse(); - } elseif ($request->getMethod() === 'POST') { - $response = $form->validateRequest($request); - if ($response !== null) { - return $response; - } - - $data = $form->getData()['data']; - - //TODO - - return new JsonResponse([ - 'result' => [ - 'coverPhoto' => null, //TODO - ], - ]); } else { throw new \LogicException('Unreachable'); }