From e8e8408bb74be8a7a3c9d51c148f7d59c96cf583 Mon Sep 17 00:00:00 2001 From: simba77 Date: Thu, 2 Nov 2023 23:40:33 +0300 Subject: [PATCH] Removed slashes from routes --- src/Controller/Deals/DealsController.php | 2 +- src/Controller/DepositAccountsController.php | 2 +- src/Controller/DepositsController.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Controller/Deals/DealsController.php b/src/Controller/Deals/DealsController.php index 8df3025..d867336 100644 --- a/src/Controller/Deals/DealsController.php +++ b/src/Controller/Deals/DealsController.php @@ -103,7 +103,7 @@ public function edit(int $id, #[MapRequestPayload] EditDealRequestDTO $dto, #[Cu return $this->json(['success' => true]); } - #[Route('/deals/sell/', name: 'app_deals_deals_sell', methods: ['POST'])] + #[Route('/deals/sell', name: 'app_deals_deals_sell', methods: ['POST'])] public function sell(#[MapRequestPayload] SellDealRequestDTO $dto, #[CurrentUser] ?User $user): JsonResponse { if ($dto->id) { diff --git a/src/Controller/DepositAccountsController.php b/src/Controller/DepositAccountsController.php index 7177dc6..a45cc82 100644 --- a/src/Controller/DepositAccountsController.php +++ b/src/Controller/DepositAccountsController.php @@ -30,7 +30,7 @@ public function index(#[CurrentUser] ?User $user): JsonResponse return $this->json(['items' => $accounts]); } - #[Route('/deposits/accounts/create/', name: 'app_deposit_accounts_create', methods: ['POST'])] + #[Route('/deposits/accounts/create', name: 'app_deposit_accounts_create', methods: ['POST'])] public function create(#[CurrentUser] ?User $user, #[MapRequestPayload] CreateAccountRequestDTO $dto): JsonResponse { $account = new DepositAccount($dto->name, $user); diff --git a/src/Controller/DepositsController.php b/src/Controller/DepositsController.php index c75cd45..3871ed4 100644 --- a/src/Controller/DepositsController.php +++ b/src/Controller/DepositsController.php @@ -34,7 +34,7 @@ public function index(#[CurrentUser] ?User $user): JsonResponse } - #[Route('/deposits/create/', name: 'app_deposits_create', methods: ['POST'])] + #[Route('/deposits/create', name: 'app_deposits_create', methods: ['POST'])] public function create(#[CurrentUser] ?User $user, #[MapRequestPayload] CreateDepositRequestDTO $dto): JsonResponse { $account = $this->entityManager->getRepository(DepositAccount::class)->findOneBy(['user' => $user, 'id' => $dto->accountId]);