mirror of
https://github.com/writefreely/writefreely
synced 2024-11-10 11:24:13 +00:00
Show number of followers on stats page
This commit is contained in:
parent
1cb593fd8c
commit
8db0afabf6
1 changed files with 6 additions and 10 deletions
16
account.go
16
account.go
|
@ -957,17 +957,13 @@ func viewStats(app *app, u *User, w http.ResponseWriter, r *http.Request) error
|
|||
Collection: c,
|
||||
TopPosts: topPosts,
|
||||
}
|
||||
/*
|
||||
if app.cfg.App.Federation {
|
||||
// TODO: fetch all user's blogs, fetch number of followers for each
|
||||
// TODO: might as well show page views for blogs, too
|
||||
folls, err = app.db.GetAPFollowers()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
obj.APFollowers = len(folls)
|
||||
if app.cfg.App.Federation {
|
||||
folls, err := app.db.GetAPFollowers(c)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
*/
|
||||
obj.APFollowers = len(*folls)
|
||||
}
|
||||
|
||||
showUserPage(w, "stats", obj)
|
||||
return nil
|
||||
|
|
Loading…
Reference in a new issue