From fb9376ab43e2089d22d5caa6888961b1254932a7 Mon Sep 17 00:00:00 2001 From: Las Zenow Date: Mon, 15 Apr 2013 22:29:57 +0200 Subject: [PATCH] The download path now is '/download/id/epub' --- templates/book.html | 2 +- templates/new.html | 2 +- templates/search.html | 2 +- trantor.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/book.html b/templates/book.html index 0ce8383..b59885f 100644 --- a/templates/book.html +++ b/templates/book.html @@ -54,7 +54,7 @@ function delBook(){ {{end}}
diff --git a/templates/new.html b/templates/new.html index 5a3a5c9..9054d27 100644 --- a/templates/new.html +++ b/templates/new.html @@ -47,7 +47,7 @@

- download + download read it!
diff --git a/templates/search.html b/templates/search.html index ce0de8b..ec172d8 100644 --- a/templates/search.html +++ b/templates/search.html @@ -33,7 +33,7 @@
diff --git a/trantor.go b/trantor.go index 4933e9c..fe3cf39 100644 --- a/trantor.go +++ b/trantor.go @@ -138,7 +138,7 @@ func main() { r.HandleFunc("/edit/{id:[0-9a-fA-F]+}", editHandler) r.HandleFunc("/save/{id:[0-9a-fA-F]+}", saveHandler).Methods("POST") r.HandleFunc("/about/", aboutHandler) - r.HandleFunc("/books/{id:[0-9a-fA-F]+}", downloadHandler) + r.HandleFunc("/download/{id:[0-9a-fA-F]+}/{epub:.*}", downloadHandler) r.HandleFunc("/cover/{id:[0-9a-fA-F]+}/{size}/{img:.*}", coverHandler) r.HandleFunc("/settings/", settingsHandler) h := http.FileServer(http.Dir(IMG_PATH))