src/Admin/src/Handler/AdminHandler.php
/**
     * Update user by uuid
     *
     * @param ServerRequestInterface $request
     * @return ResponseInterface
     */
Update user by uuid
@param ServerRequestInterface $request
@return ResponseInterface
Update user by uuid @param ServerRequestInterface $request @return ResponseInterface
public function patch(ServerRequestInterface $request): ResponseInterface
    {
        $inputFilter = (new UpdateAdminInputFilter())->getInputFilter();
        $inputFilter->setData($request->getParsedBody());
        if (!$inputFilter->isValid()) {
            return $this->errorResponse($inputFilter->getMessages());
        }
        try {
            $uuid = $request->getAttribute('uuid');
            $admin = $this->adminService->findOneBy(['uuid' => $uuid]);
            if (!($admin instanceof Admin)) {
                return $this->notFoundResponse(sprintf(Message::NOT_FOUND_BY_UUID, 'admin', $uuid));
            }
            $user = $this->adminService->updateAdmin($admin, $inputFilter->getValues());
            return $this->createResponse($request, $user);
        } catch (Throwable $exception) {
            return $this->errorResponse($exception->getMessage());
        }
    }
public function patch ( ServerRequestInterface $ request ) : ResponseInterface { $ inputFilter = ( new UpdateAdminInputFilter ( ) ) -> getInputFilter ( ) ; $ inputFilter -> setData ( $ request -> getParsedBody ( ) ) ; if ( ! $ inputFilter -> isValid ( ) ) { return $ this -> errorResponse ( $ inputFilter -> getMessages ( ) ) ; } try { $ uuid = $ request -> getAttribute ( 'uuid' ) ; $ admin = $ this -> adminService -> findOneBy ( [ 'uuid' => $ uuid ] ) ; if ( ! ( $ admin instanceof Admin ) ) { return $ this -> notFoundResponse ( sprintf ( Message :: NOT_FOUND_BY_UUID , 'admin' , $ uuid ) ) ; } $ user = $ this -> adminService -> updateAdmin ( $ admin , $ inputFilter -> getValues ( ) ) ; return $ this -> createResponse ( $ request , $ user ) ; } catch ( Throwable $ exception ) { return $ this -> errorResponse ( $ exception -> getMessage ( ) ) ; } }
Update user by uuid
 @param ServerRequestInterface $request
 @return ResponseInterface
Update user by uuid @param ServerRequestInterface $request @return ResponseInterface