Remove hardcoded URLs
Cette révision appartient à :
Parent
4814fff3dc
révision
a201d0d058
2 fichiers modifiés avec 5 ajouts et 3 suppressions
|
@ -4,6 +4,7 @@ import(
|
|||
"time"
|
||||
"net/http"
|
||||
"github.com/gorilla/feeds"
|
||||
"github.com/ewhal/nyaa/config"
|
||||
"github.com/ewhal/nyaa/util/search"
|
||||
"strconv"
|
||||
)
|
||||
|
@ -18,7 +19,7 @@ func RssHandler(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
feed := &feeds.Feed{
|
||||
Title: "Nyaa Pantsu",
|
||||
Link: &feeds.Link{Href: "https://nyaa.pantsu.cat/"},
|
||||
Link: &feeds.Link{Href: "https://" + config.WebAddress + "/"},
|
||||
Created: created_as_time,
|
||||
}
|
||||
feed.Items = []*feeds.Item{}
|
||||
|
@ -44,4 +45,4 @@ func RssHandler(w http.ResponseWriter, r *http.Request) {
|
|||
} else {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import (
|
|||
"strings"
|
||||
"regexp"
|
||||
|
||||
"github.com/ewhal/nyaa/config"
|
||||
"github.com/ewhal/nyaa/service/captcha"
|
||||
"github.com/ewhal/nyaa/util"
|
||||
"github.com/ewhal/nyaa/util/metainfo"
|
||||
|
@ -56,7 +57,7 @@ var ErrPrivateTorrent = errors.New("torrent is private")
|
|||
|
||||
// error indicating a problem with its trackers
|
||||
// FIXME: hardcoded link
|
||||
var ErrTrackerProblem = errors.New("torrent does not have any (working) trackers: https://nyaa.pantsu.cat/faq#trackers")
|
||||
var ErrTrackerProblem = errors.New("torrent does not have any (working) trackers: https://" + config.WebAddress + "/faq#trackers")
|
||||
|
||||
// error indicating a torrent's name is invalid
|
||||
var ErrInvalidTorrentName = errors.New("torrent name is invalid")
|
||||
|
|
Référencer dans un nouveau ticket