magnetico-web/config/routes.yaml

37 lines
853 B
YAML
Raw Normal View History

# Basic Front-End
index:
path: /
controller: App\Controller\MainController::index
torrents_search:
path: /torrents/search
controller: App\Controller\TorrentController::searchTorrent
requirements:
method: GET
torrents_show:
path: /torrents/{id}
controller: App\Controller\TorrentController::showTorrent
requirements:
method: GET
id: '\d+'
# API
api_v1_torrents_search:
path: /api/v1/torrents/search
controller: App\Api\V1\Controller\TorrentController::search
defaults:
_format: json
requirements:
method: GET
_format: json
api_v1_torrents_show:
path: /api/v1/torrents/{id}
controller: App\Api\V1\Controller\TorrentController::show
defaults:
_format: json
requirements:
method: GET
_format: json
id: '\d+'