Only GET for this form is required
authorCyperghost <olaf_schmitz_1@t-online.de>
Thu, 28 Nov 2024 11:40:46 +0000 (12:40 +0100)
committerCyperghost <olaf_schmitz_1@t-online.de>
Thu, 28 Nov 2024 11:40:46 +0000 (12:40 +0100)
wcfsetup/install/files/lib/action/UserCoverPhotoAction.class.php

index 134b84bf37870a7b94de267fef4e88d16a31abd8..a490f391fb25580e6676e8b357150444404c5439 100644 (file)
@@ -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');
         }