aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/user/profile.go
diff options
context:
space:
mode:
author6543 <m.huber@kithara.com>2024-01-21 14:42:35 +0100
committerGitHub <noreply@github.com>2024-01-21 21:42:35 +0800
commit49d76639295a89bac8a656360782f0c3a1d2707c (patch)
tree0cd381a1969ebb0248959e9c08d6cf63ec916504 /routers/web/user/profile.go
parent1df06e3f399307c14b60a2b88e1b26cedc1ae2f9 (diff)
downloadgitea-49d76639295a89bac8a656360782f0c3a1d2707c.tar.gz
gitea-49d76639295a89bac8a656360782f0c3a1d2707c.zip
Revert adding htmx until we finaly decide to add it (#28879)
Diffstat (limited to 'routers/web/user/profile.go')
-rw-r--r--routers/web/user/profile.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/routers/web/user/profile.go b/routers/web/user/profile.go
index 73ab93caed..c5305ebcd9 100644
--- a/routers/web/user/profile.go
+++ b/routers/web/user/profile.go
@@ -14,7 +14,6 @@ import (
"code.gitea.io/gitea/models/db"
repo_model "code.gitea.io/gitea/models/repo"
user_model "code.gitea.io/gitea/models/user"
- "code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/log"
@@ -27,10 +26,6 @@ import (
shared_user "code.gitea.io/gitea/routers/web/shared/user"
)
-const (
- tplProfileBigAvatar base.TplName = "shared/user/profile_big_avatar"
-)
-
// OwnerProfile render profile page for a user or a organization (aka, repo owner)
func OwnerProfile(ctx *context.Context) {
if strings.Contains(ctx.Req.Header.Get("Accept"), "application/rss+xml") {
@@ -314,10 +309,8 @@ func Action(ctx *context.Context) {
if err != nil {
log.Error("Failed to apply action %q: %v", ctx.FormString("action"), err)
- ctx.Error(http.StatusBadRequest, fmt.Sprintf("Action %q failed", ctx.FormString("action")))
+ ctx.JSONError(fmt.Sprintf("Action %q failed", ctx.FormString("action")))
return
}
-
- shared_user.PrepareContextForProfileBigAvatar(ctx)
- ctx.HTML(http.StatusOK, tplProfileBigAvatar)
+ ctx.JSONOK()
}