feat(feed): Increase number of activities fetched from the server
This commit is contained in:
parent
d57c150cf3
commit
62982c63d8
15
feed.go
15
feed.go
@ -30,7 +30,7 @@ func getActivityFeed() []Activity {
|
||||
feed := []Activity{}
|
||||
for _, server := range config.servers {
|
||||
client := Servers[server.servername]
|
||||
resp, err := http.Get(fmt.Sprintf("%s/api/v1/users/%s/activities/feeds?limit=10&page=1",
|
||||
resp, err := http.Get(fmt.Sprintf("%s/api/v1/users/%s/activities/feeds?limit=15&page=1",
|
||||
server.url,
|
||||
server.username,
|
||||
))
|
||||
@ -52,17 +52,6 @@ func getActivityFeed() []Activity {
|
||||
fmt.Println("Error getting user: "+fmt.Sprint(err))
|
||||
continue
|
||||
}
|
||||
// repo, _, err := client.GetRepo(
|
||||
// obj["repo"].
|
||||
// (map[string]interface{})["name"].(string),
|
||||
// obj["repo"].
|
||||
// (map[string]interface{})["owner"].
|
||||
// (map[string]interface{})["login"].(string),
|
||||
// )
|
||||
// if err != nil {
|
||||
// fmt.Println("Failed to get repository: "+fmt.Sprint(err))
|
||||
// continue
|
||||
// }
|
||||
var comment gitea.Comment
|
||||
if obj["comment"] != nil {
|
||||
raw_comment := obj["comment"].(map[string]interface{})
|
||||
@ -94,3 +83,5 @@ func getActivityFeed() []Activity {
|
||||
}
|
||||
return feed
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user