summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authornavanchauhan <navanchauhan@gmail.com>2022-10-16 23:34:21 -0600
committernavanchauhan <navanchauhan@gmail.com>2022-10-16 23:34:21 -0600
commite3f121adcee66f218a2ab6decf4b20d38fdaf19a (patch)
tree24f24d712d3a29329ed3b619533f3d520c0e37f4 /main.go
parent83b48f3e8833c2f693df04ef58ca57afa76dc2fa (diff)
shifted / to /classic
Diffstat (limited to 'main.go')
-rw-r--r--main.go8
1 files changed, 4 insertions, 4 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") != "" {