renamed 'search' to 'app_search' in router
This commit is contained in:
parent
b68d533bac
commit
c838a3d2ed
@ -11,7 +11,8 @@ use GuzzleHttp\Client;
|
||||
class SearchController extends AbstractController
|
||||
{
|
||||
|
||||
private static function makeRequest(string $method,string $endpoint, array $querryParams){
|
||||
private static function makeRequest(string $method, string $endpoint, array $querryParams)
|
||||
{
|
||||
|
||||
// Create a new Guzzle HTTP client
|
||||
$baseUri = 'https://api.discogs.com/';
|
||||
@ -43,7 +44,7 @@ class SearchController extends AbstractController
|
||||
return json_decode($body, true);
|
||||
}
|
||||
|
||||
#[Route('/search', name: 'search')]
|
||||
#[Route('/search', name: 'app_search')]
|
||||
public function index(Request $request): Response
|
||||
{
|
||||
$page = $request->query->get('page');
|
||||
|
||||
@ -1,37 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta charset="UTF-8" />
|
||||
<title>{% block title %}{{app.title}}{% endblock %}</title>
|
||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
|
||||
<link
|
||||
rel="icon"
|
||||
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>"
|
||||
/>
|
||||
{% block stylesheets %}
|
||||
<link rel="stylesheet" href="{{ asset('styles/app.css') }}" />
|
||||
<link rel="stylesheet" href="{{ asset('styles/fonts.css') }}" />
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{% block importmap %}{{ importmap('app') }}{% endblock %}
|
||||
{% endblock %}
|
||||
{% endblock %} {% block javascripts %} {% block importmap %}{{
|
||||
importmap('app') }}{% endblock %} {% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
{% block header %}
|
||||
<header>
|
||||
<a href="{{url('index')}}">Frutti</a>
|
||||
<form action="{{url('search')}}" method="get">
|
||||
<input type="text" name="q" id="q" placeholder="Search">
|
||||
<form action="{{url('app_search')}}" method="get">
|
||||
<input type="text" name="q" id="q" placeholder="Search" />
|
||||
<label>
|
||||
<input type="submit" value="search">
|
||||
<img src="{{ asset('/styles/search.svg') }}" alt="Search">
|
||||
<input type="submit" value="search" />
|
||||
<img src="{{ asset('/styles/search.svg') }}" alt="Search" />
|
||||
</label>
|
||||
</form>
|
||||
<a href="{{url('app_login')}}" class="button-link">Connect</a>
|
||||
</header>
|
||||
{% endblock %}
|
||||
|
||||
<main>
|
||||
{% block body %}{% endblock %}
|
||||
</main>
|
||||
|
||||
<main>{% block body %}{% endblock %}</main>
|
||||
|
||||
{% block footer %}
|
||||
<footer>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user