mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
Refactor and simplify redirect to url (#3674)
This commit is contained in:
parent
a2a49c93c7
commit
7b2b900e13
5 changed files with 29 additions and 24 deletions
|
@ -307,11 +307,7 @@ func Action(ctx *context.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
redirectTo := ctx.Query("redirect_to")
|
||||
if len(redirectTo) == 0 {
|
||||
redirectTo = ctx.Repo.RepoLink
|
||||
}
|
||||
ctx.Redirect(redirectTo)
|
||||
ctx.RedirectToFirst(ctx.Query("redirect_to"), ctx.Repo.RepoLink)
|
||||
}
|
||||
|
||||
// Download download an archive of a repository
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue