diff options
Diffstat (limited to 'routers/user/home.go')
-rw-r--r-- | routers/user/home.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/routers/user/home.go b/routers/user/home.go index f7f1786b33..779971ca97 100644 --- a/routers/user/home.go +++ b/routers/user/home.go @@ -114,8 +114,14 @@ func Dashboard(ctx *context.Context) { ctx.Data["SearchLimit"] = setting.UI.User.RepoPagingNum // no heatmap access for admins; GetUserHeatmapDataByUser ignores the calling user // so everyone would get the same empty heatmap - ctx.Data["EnableHeatmap"] = setting.Service.EnableUserHeatmap && !ctxUser.KeepActivityPrivate - ctx.Data["HeatmapUser"] = ctxUser.Name + if setting.Service.EnableUserHeatmap && !ctxUser.KeepActivityPrivate { + data, err := models.GetUserHeatmapDataByUser(ctxUser) + if err != nil { + ctx.ServerError("GetUserHeatmapDataByUser", err) + return + } + ctx.Data["HeatmapData"] = data + } var err error var mirrors []*models.Repository |