Fix torznab to /api also
Torznab can still be accessed to /feed/torznab and also to /api?t=something
Cette révision appartient à :
Parent
abcdfd426b
révision
8bddc86843
|
@ -27,6 +27,10 @@ import (
|
|||
|
||||
// APIHandler : Controller for api request on torrent list
|
||||
func APIHandler(w http.ResponseWriter, r *http.Request) {
|
||||
t := r.URL.Query().Get("t")
|
||||
if t != "" {
|
||||
RSSTorznabHandler(w, r)
|
||||
} else {
|
||||
vars := mux.Vars(r)
|
||||
page := vars["page"]
|
||||
whereParams := serviceBase.WhereParams{}
|
||||
|
@ -92,6 +96,7 @@ func APIHandler(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// APIViewHandler : Controller for viewing a torrent by its ID
|
||||
func APIViewHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
|
Référencer dans un nouveau ticket