The /books/ handler now use the BOOKS_PATH constant
This commit is contained in:
parent
4805d926f0
commit
038cac6a62
1 changed files with 1 additions and 1 deletions
|
@ -61,7 +61,7 @@ func bookHandler(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
func downloadHandler(w http.ResponseWriter, r *http.Request) {
|
||||
file := r.URL.Path[1:]
|
||||
file := BOOKS_PATH + r.URL.Path[len("/books/"):]
|
||||
db.IncDownload(file)
|
||||
http.ServeFile(w, r, file)
|
||||
}
|
||||
|
|
Reference in a new issue