1
0
Fork 0
forked from forgejo/forgejo

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>
This commit is contained in:
techknowlogick 2022-08-17 19:25:25 -04:00 committed by GitHub
parent 208b4ee417
commit d8e6c99125
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 105 additions and 0 deletions

View file

@ -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