diff --git a/routers/web/user/profile.go b/routers/web/user/profile.go index 442fd0433..07a2261c9 100644 --- a/routers/web/user/profile.go +++ b/routers/web/user/profile.go @@ -287,9 +287,9 @@ func Action(ctx *context.Context) { } if err != nil { - ctx.ServerError(fmt.Sprintf("Action (%s)", ctx.FormString("action")), err) + log.Error("Failed to apply action %q: %v", ctx.FormString("action"), err) + ctx.JSONError(fmt.Sprintf("Action %q failed", ctx.FormString("action"))) return } - // FIXME: We should check this URL and make sure that it's a valid Gitea URL - ctx.RedirectToFirst(ctx.FormString("redirect_to"), ctx.ContextUser.HomeLink()) + ctx.JSONOK() } diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl index 7f52b8cc6..967b31e7a 100644 --- a/templates/org/home.tmpl +++ b/templates/org/home.tmpl @@ -20,16 +20,13 @@
diff --git a/templates/org/projects/view.tmpl b/templates/org/projects/view.tmpl index ef8ec2422..33346b615 100644 --- a/templates/org/projects/view.tmpl +++ b/templates/org/projects/view.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -