<?php

namespace App\User\Framework\Controller\Api;

use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Bundle\SecurityBundle\Security;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;

class UserApiController extends AbstractController
{
    #[Route('/api/user/preferences/values', name: 'api_user_preferences_values')]
    public function getUserPreferenceValues(
        Security $security
    ): Response {
        return $this->json(
            $security->getUser()->getUserPreferenceValues()
        );
    }
}
