mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-22 03:37:43 +00:00
Fix watcher list endpoint
This commit is contained in:
parent
8c5422af20
commit
af592c446f
1 changed files with 2 additions and 5 deletions
|
@ -240,7 +240,7 @@ type watcherItem struct {
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
Label string `json:"label"`
|
Label string `json:"label"`
|
||||||
SourceLabel string `json:"source_label"`
|
SourceLabel string `json:"source_label"`
|
||||||
Upvotes *int64 `json:"upvotes,omitempty"`
|
Upvotes int64 `json:"upvotes,omitempty"`
|
||||||
Keyword string `json:"keyword,omitempty"`
|
Keyword string `json:"keyword,omitempty"`
|
||||||
Flair string `json:"flair,omitempty"`
|
Flair string `json:"flair,omitempty"`
|
||||||
Domain string `json:"domain,omitempty"`
|
Domain string `json:"domain,omitempty"`
|
||||||
|
@ -274,10 +274,7 @@ func (a *api) listWatchersHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
Domain: watcher.Domain,
|
Domain: watcher.Domain,
|
||||||
Hits: watcher.Hits,
|
Hits: watcher.Hits,
|
||||||
Author: watcher.Author,
|
Author: watcher.Author,
|
||||||
}
|
Upvotes: watcher.Upvotes,
|
||||||
|
|
||||||
if watcher.Upvotes != 0 {
|
|
||||||
wi.Upvotes = &watcher.Upvotes
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wis[i] = wi
|
wis[i] = wi
|
||||||
|
|
Loading…
Reference in a new issue