diff options
author | techknowlogick <techknowlogick@gitea.io> | 2022-08-17 19:25:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-18 02:25:25 +0300 |
commit | d8e6c9912594dfa03d55a021d538b6b0bd0561ee (patch) | |
tree | bebedc28da71c6b284ea8a80b70cccf4d58d13d4 /routers/web/user | |
parent | 208b4ee417c528f11583bb84f3f3481bfad12ac7 (diff) | |
download | gitea-d8e6c9912594dfa03d55a021d538b6b0bd0561ee.tar.gz gitea-d8e6c9912594dfa03d55a021d538b6b0bd0561ee.zip |
Add badge capabilities to users (#20607)
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Diffstat (limited to 'routers/web/user')
-rw-r--r-- | routers/web/user/profile.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/routers/web/user/profile.go b/routers/web/user/profile.go index 6f23d239e2..c804be3c5f 100644 --- a/routers/web/user/profile.go +++ b/routers/web/user/profile.go @@ -105,6 +105,13 @@ func Profile(ctx *context.Context) { ctx.Data["Orgs"] = orgs ctx.Data["HasOrgsVisible"] = organization.HasOrgsVisible(orgs, ctx.Doer) + badges, _, err := user_model.GetUserBadges(ctx, ctx.ContextUser) + if err != nil { + ctx.ServerError("GetUserBadges", err) + return + } + ctx.Data["Badges"] = badges + tab := ctx.FormString("tab") ctx.Data["TabName"] = tab |