summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.go8
-rw-r--r--results.gtpl4
-rw-r--r--search.gtpl2
-rw-r--r--templates/home.html2
-rw-r--r--templates/search_results.html2
5 files changed, 9 insertions, 9 deletions
diff --git a/main.go b/main.go
index a41f774..98aa5d5 100644
--- a/main.go
+++ b/main.go
@@ -52,12 +52,12 @@ func main() {
index := client.Index("fda510k")
- http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
+ http.HandleFunc("/classic/", func(w http.ResponseWriter, r *http.Request) {
t, _ := template.ParseFiles("search.gtpl")
t.Execute(w, nil)
})
- http.HandleFunc("/2.0/", func(w http.ResponseWriter, r *http.Request) {
+ http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
t, _ := template.ParseFiles("templates/home.html")
t.Execute(w, nil)
})
@@ -79,7 +79,7 @@ func main() {
os.Exit(1)
}
- http.HandleFunc("/2.0/search", func(w http.ResponseWriter, r *http.Request) {
+ http.HandleFunc("/search", func(w http.ResponseWriter, r *http.Request) {
r.ParseForm()
fmt.Println(r.Form)
if r.Form["query"] != nil || r.FormValue("query") != "" {
@@ -140,7 +140,7 @@ func main() {
}
})
- http.HandleFunc("/search", func(w http.ResponseWriter, r *http.Request) {
+ http.HandleFunc("/classic/search", func(w http.ResponseWriter, r *http.Request) {
r.ParseForm()
fmt.Println(r.Form)
if r.Form["query"] != nil || r.FormValue("query") != "" {
diff --git a/results.gtpl b/results.gtpl
index a68b122..151a7d3 100644
--- a/results.gtpl
+++ b/results.gtpl
@@ -29,8 +29,8 @@
{{ end }}
</table>
{{ if .MoreResults }}
- <a href="/search?query={{.OriginalQuery.Query}}&offset={{.LastOffset}}"> <p>Previous Page</p></a>
- <a href="/search?query={{.OriginalQuery.Query}}&offset={{.Offset}}"> <p>Next Page</p></a>
+ <a href="/classic/search?query={{.OriginalQuery.Query}}&offset={{.LastOffset}}"> <p>Previous Page</p></a>
+ <a href="/classic/search?query={{.OriginalQuery.Query}}&offset={{.Offset}}"> <p>Next Page</p></a>
{{ end }}
</body>
</html> \ No newline at end of file
diff --git a/search.gtpl b/search.gtpl
index 0b83191..c14c02b 100644
--- a/search.gtpl
+++ b/search.gtpl
@@ -2,7 +2,7 @@
<html>
<body>
<h1>DogeKnows</h1>
- <form action="/search" method="GET">
+ <form action="/classic/search" method="GET">
<input type="text" name="query" value="{{.OriginalQuery.Query}}" placeholder="Search Query" spellcheck="false">
<input type="submit">
</form>
diff --git a/templates/home.html b/templates/home.html
index 35e3ff6..5357aa1 100644
--- a/templates/home.html
+++ b/templates/home.html
@@ -20,7 +20,7 @@
</section>
<section class="section">
<div class="container">
- <form action="/2.0/search" method="GET">
+ <form action="/search" method="GET">
<div class="field has-addons">
<div class="control is-expanded has-icons-left">
<input class="input is-large" type="text" name="query" value="{{.OriginalQuery.Query}}" placeholder="Search Query" spellcheck="false">
diff --git a/templates/search_results.html b/templates/search_results.html
index d6b65e4..c6a2c4a 100644
--- a/templates/search_results.html
+++ b/templates/search_results.html
@@ -21,7 +21,7 @@
<section class="section">
<div class="container">
<div class="container">
- <form action="/2.0/search" method="GET">
+ <form action="/search" method="GET">
<div class="field has-addons">
<div class="control is-expanded has-icons-left">
<input class="input" type="text" name="query" value="{{.OriginalQuery.Query}}" placeholder="Search Query" spellcheck="false">