<?php
namespace Modules\Additional\Specifique\Client64\Modules\Utilisateur\Controller;

use GuzzleHttp\Psr7\Response;
use Modules\Additional\Specifique\Client64\Modules\Panier\Service\UpdateCdcBySi;
use Skeleton\Controller\Controller;

class MaSessionSpecifiqueController extends Controller
{
    /**
     * @return Response
     */
    public function updateCDCAction()
    {
        $post = $this->request->getParsedBody();

        $cdc = (new UpdateCdcBySi())->updateCdcBySI($this->pdo, $post['CODE_STE'], $post['SI_CODE']);

        return new Response(200, [], (string) json_encode(['CDC' => $cdc]));
    }
}
