@@ -14,7 +14,6 @@ import (
1414 "code.gitea.io/gitea/models/db"
1515 repo_model "code.gitea.io/gitea/models/repo"
1616 user_model "code.gitea.io/gitea/models/user"
17- "code.gitea.io/gitea/modules/base"
1817 "code.gitea.io/gitea/modules/context"
1918 "code.gitea.io/gitea/modules/git"
2019 "code.gitea.io/gitea/modules/log"
@@ -27,10 +26,6 @@ import (
2726 shared_user "code.gitea.io/gitea/routers/web/shared/user"
2827)
2928
30- const (
31- tplProfileBigAvatar base.TplName = "shared/user/profile_big_avatar"
32- )
33-
3429// OwnerProfile render profile page for a user or a organization (aka, repo owner)
3530func OwnerProfile (ctx * context.Context ) {
3631 if strings .Contains (ctx .Req .Header .Get ("Accept" ), "application/rss+xml" ) {
@@ -314,10 +309,8 @@ func Action(ctx *context.Context) {
314309
315310 if err != nil {
316311 log .Error ("Failed to apply action %q: %v" , ctx .FormString ("action" ), err )
317- ctx .Error ( http . StatusBadRequest , fmt .Sprintf ("Action %q failed" , ctx .FormString ("action" )))
312+ ctx .JSONError ( fmt .Sprintf ("Action %q failed" , ctx .FormString ("action" )))
318313 return
319314 }
320-
321- shared_user .PrepareContextForProfileBigAvatar (ctx )
322- ctx .HTML (http .StatusOK , tplProfileBigAvatar )
315+ ctx .JSONOK ()
323316}
0 commit comments