Show number of followers on stats page

pull/24/head
Matt Baer 6 years ago
parent 1cb593fd8c
commit 8db0afabf6
  1. 16
      account.go

@ -957,17 +957,13 @@ func viewStats(app *app, u *User, w http.ResponseWriter, r *http.Request) error
Collection: c, Collection: c,
TopPosts: topPosts, TopPosts: topPosts,
} }
/* if app.cfg.App.Federation {
if app.cfg.App.Federation { folls, err := app.db.GetAPFollowers(c)
// TODO: fetch all user's blogs, fetch number of followers for each if err != nil {
// TODO: might as well show page views for blogs, too return err
folls, err = app.db.GetAPFollowers()
if err != nil {
return err
}
obj.APFollowers = len(folls)
} }
*/ obj.APFollowers = len(*folls)
}
showUserPage(w, "stats", obj) showUserPage(w, "stats", obj)
return nil return nil

Loading…
Cancel
Save