From 81eb903d216e95773412ed0ec443e9d9e810520d Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Fri, 22 Jun 2018 22:58:36 +0300 Subject: [PATCH] API V1 torrents list/search URI changed. --- config/routes.yaml | 4 ++-- src/Controller/TorrentController.php | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/config/routes.yaml b/config/routes.yaml index 5060052..3c68b70 100644 --- a/config/routes.yaml +++ b/config/routes.yaml @@ -17,8 +17,8 @@ torrents_show: id: '\d+' # API -api_v1_torrents_search: - path: /api/v1/torrents/search +api_v1_torrents: + path: /api/v1/torrents controller: App\Api\V1\Controller\TorrentController::search defaults: _format: json diff --git a/src/Controller/TorrentController.php b/src/Controller/TorrentController.php index 1e7b1bd..737fbed 100644 --- a/src/Controller/TorrentController.php +++ b/src/Controller/TorrentController.php @@ -7,8 +7,7 @@ use App\Repository\TorrentRepository; use Pagerfanta\Adapter\DoctrineORMAdapter; use Pagerfanta\Pagerfanta; use Symfony\Bundle\FrameworkBundle\Controller\Controller; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\{Request, Response}; class TorrentController extends Controller {