mirror of
https://github.com/davegallant/rfd-fyi.git
synced 2025-08-06 07:13:39 +00:00
Add dealer badge
This commit is contained in:
@@ -91,7 +91,7 @@ func (a *App) listTopics(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func (a *App) refreshTopics() {
|
||||
latestTopics := a.getDeals(9, 1, 4)
|
||||
latestTopics := a.getDeals(9, 1, 6)
|
||||
latestTopics = a.updateScores(latestTopics)
|
||||
log.Debug().Msg("Refreshing topics")
|
||||
a.CurrentTopics = latestTopics
|
||||
|
@@ -14,6 +14,7 @@ type Topic struct {
|
||||
PostTime string `json:"post_time"`
|
||||
LastPostTime string `json:"last_post_time"`
|
||||
Votes Votes
|
||||
Offer Offer
|
||||
Score int `json:"score"`
|
||||
} // @name Topic
|
||||
|
||||
@@ -21,3 +22,7 @@ type Votes struct {
|
||||
Up int `json:"total_up"`
|
||||
Down int `json:"total_down"`
|
||||
} // @name Votes
|
||||
|
||||
type Offer struct {
|
||||
DealerName string `json:"dealer_name"`
|
||||
} // @name Offer
|
||||
|
Reference in New Issue
Block a user