summaryrefslogtreecommitdiffstats
path: root/routers/repo/repo.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-07-24 04:50:05 +0800
committerUnknwon <u@gogs.io>2015-07-24 04:50:05 +0800
commit4447a20f872776123c42d5b8ca987c114fb4b80b (patch)
tree3692ada9ffe5bbc54d35cb98ea57a95450f8c99d /routers/repo/repo.go
parent548b95f7b593d80a241c9a1027eda6b4549ca995 (diff)
downloadgitea-4447a20f872776123c42d5b8ca987c114fb4b80b.tar.gz
gitea-4447a20f872776123c42d5b8ca987c114fb4b80b.zip
UI: issues - finish basic frame
Diffstat (limited to 'routers/repo/repo.go')
-rw-r--r--routers/repo/repo.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go
index cd231ccd62..605071d110 100644
--- a/routers/repo/repo.go
+++ b/routers/repo/repo.go
@@ -374,7 +374,13 @@ func Action(ctx *middleware.Context) {
})
return
}
- ctx.Redirect(ctx.Repo.RepoLink)
+
+ redirectTo := ctx.Query("redirect_to")
+ if len(redirectTo) == 0 {
+ redirectTo = ctx.Repo.RepoLink
+ }
+ ctx.Redirect(redirectTo)
+
return
ctx.JSON(200, map[string]interface{}{
"ok": true,