Moved redirect to defer

This commit is contained in:
kolaente 2018-07-07 00:38:40 +02:00 committed by kolaente
parent 49c471f492
commit a283309f8a
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B

View File

@ -83,6 +83,9 @@ func RemoveDependency(ctx *context.Context) {
return
}
// Redirect
ctx.Redirect(fmt.Sprintf("%s/issues/%d", ctx.Repo.RepoLink, issueIndex), http.StatusSeeOther)
// Dependency Type
depTypeStr := ctx.Req.PostForm.Get("dependencyType")
@ -113,6 +116,4 @@ func RemoveDependency(ctx *context.Context) {
ctx.ServerError("RemoveIssueDependency", err)
return
}
ctx.Redirect(fmt.Sprintf("%s/issues/%d", ctx.Repo.RepoLink, issueIndex), http.StatusSeeOther)
}