32 lines
735 B
PHP
32 lines
735 B
PHP
<?php
|
|
|
|
namespace KupShop\ApiBundle\Controller;
|
|
|
|
use KupShop\ApiBundle\View\UserSettingsView;
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
use Symfony\Component\HttpFoundation\RedirectResponse;
|
|
use Symfony\Component\Routing\Annotation\Route;
|
|
|
|
class UserController extends AbstractController
|
|
{
|
|
/**
|
|
* @Route("/uzivatel/api/")
|
|
*/
|
|
public function settingAction(UserSettingsView $view)
|
|
{
|
|
return $view->getResponse();
|
|
}
|
|
|
|
/**
|
|
* @Route("/uzivatel/api/generovat")
|
|
*/
|
|
public function generateAction(UserSettingsView $view)
|
|
{
|
|
$view->handleChangeApiPassword();
|
|
|
|
return new RedirectResponse(
|
|
path('kupshop_api_user_setting')
|
|
);
|
|
}
|
|
}
|