Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a748a82d authored by Nicolas Gelot's avatar Nicolas Gelot
Browse files

Fix endpoint /search instead of root

parent cffc1ef3
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -171,7 +171,7 @@ $(document).ready(function(){
      "time_range": $("select[name='time_range']").find('option:selected').attr("value")
      "time_range": $("select[name='time_range']").find('option:selected').attr("value")
    });
    });


    fetch("/?categories=images&" + query_params, {"headers": headers})
    fetch(window.location.origin + "/search?categories=images&" + query_params, {"headers": headers})
      .then(function(r) { return r.json(); })
      .then(function(r) { return r.json(); })
      .then(function(data) {
      .then(function(data) {
        if (data.results) {
        if (data.results) {
@@ -179,7 +179,7 @@ $(document).ready(function(){
        }
        }
      });
      });


    fetch("/?categories=videos&" + query_params, {"headers": headers})
    fetch(window.location.origin + "/search?categories=videos&" + query_params, {"headers": headers})
      .then(function(r) { return r.json(); })
      .then(function(r) { return r.json(); })
      .then(function(data) {
      .then(function(data) {
        if (data.results) {
        if (data.results) {
+0 −0

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

+2 −2
Original line number Original line Diff line number Diff line
@@ -81,7 +81,7 @@ $(document).ready(function(){
      "time_range": $("select[name='time_range']").find('option:selected').attr("value")
      "time_range": $("select[name='time_range']").find('option:selected').attr("value")
    });
    });


    fetch("/?categories=images&" + query_params, {"headers": headers})
    fetch(window.location.origin + "/search?categories=images&" + query_params, {"headers": headers})
      .then(function(r) { return r.json(); })
      .then(function(r) { return r.json(); })
      .then(function(data) {
      .then(function(data) {
        if (data.results) {
        if (data.results) {
@@ -89,7 +89,7 @@ $(document).ready(function(){
        }
        }
      });
      });


    fetch("/?categories=videos&" + query_params, {"headers": headers})
    fetch(window.location.origin + "/search?categories=videos&" + query_params, {"headers": headers})
      .then(function(r) { return r.json(); })
      .then(function(r) { return r.json(); })
      .then(function(data) {
      .then(function(data) {
        if (data.results) {
        if (data.results) {
+1 −1
Original line number Original line Diff line number Diff line
@@ -7,7 +7,7 @@


<!-- Search bar base -->
<!-- Search bar base -->
{% macro search_bar(value="", inline=false, rtl=false, autofocus=false) -%}
{% macro search_bar(value="", inline=false, rtl=false, autofocus=false) -%}
    <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" id="search_form" {% if inline %}class="inline-search" {% endif %} role="search">
    <form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" id="search_form" {% if inline %}class="inline-search" {% endif %} role="search">
        <div id="search_input_container" {% if rtl -%} class="rtl" {%- endif %}>
        <div id="search_input_container" {% if rtl -%} class="rtl" {%- endif %}>
            {% if inline %}
            {% if inline %}
            <a href="{{ url_for('index') }}" id="logo_link"><img src="{{ url_for('static', filename='themes/eelo/img/logo.png') }}" alt="" id="logo"></a>
            <a href="{{ url_for('index') }}" id="logo_link"><img src="{{ url_for('static', filename='themes/eelo/img/logo.png') }}" alt="" id="logo"></a>