Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
namespace App\Controller;
use App\Service\Action\ActionServiceInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Attribute\Route;
#[Route('/api', name: 'api_')]
class ProfileController extends AbstractController
{
#[Route('/profile', name: 'profile', methods: ['GET'])]
public function profile(
ActionServiceInterface $profileService
): JsonResponse
{
return $profileService->getResponse();
}
#[Route('/profile/delete', name: 'profile_delete', methods: ['GET'])]
public function deleteProfile(
ActionServiceInterface $deleteProfileService,
): JsonResponse
{
return $deleteProfileService->getResponse();
}
#[Route('/profile/recovery', name: 'profile_recovery', methods: ['POST'])]
public function recoveryProfile(
ActionServiceInterface $recoveryProfileService,
): JsonResponse
{
return $recoveryProfileService->getResponse();
}
#[Route('/profile/recovery/check', name: 'profile_recovery_check', methods: ['POST'])]
public function recoveryCodeProfile(
ActionServiceInterface $checkRecoveryService,
): JsonResponse
{
return $checkRecoveryService->getResponse();
}
}