mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-26 06:16:56 +09:00
Support for Custom URI Schemes in OAuth2 Redirect URIs (#37356)
Fix #34349 By the way, remove `(ctx *APIContext) HasAPIError() ` and `(ctx *APIContext) GetErrMsg()` because they do nothing, the error handling has been done in API's middeware The existing OAuth2 tests were not quite right, refactored them together
This commit is contained in:
1 parent
8cfcef32c6
commit
83bdfc2a57
21 files changed
+340
-512
No files matched your search
@@ -72,7 +72,7 @@ func CreateCodeComment(ctx *context.Context) {
|
||||
}
|
||||
|
||||
if ctx.HasError() {
|
||||
ctx.Flash.Error(ctx.Data["ErrorMsg"].(string))
|
||||
ctx.Flash.Error(ctx.GetErrMsg())
|
||||
ctx.Redirect(fmt.Sprintf("%s/pulls/%d/files", ctx.Repo.RepoLink, issue.Index))
|
||||
return
|
||||
}
|
||||
@@ -230,7 +230,7 @@ func SubmitReview(ctx *context.Context) {
|
||||
return
|
||||
}
|
||||
if ctx.HasError() {
|
||||
ctx.Flash.Error(ctx.Data["ErrorMsg"].(string))
|
||||
ctx.Flash.Error(ctx.GetErrMsg())
|
||||
ctx.JSONRedirect(fmt.Sprintf("%s/pulls/%d/files", ctx.Repo.RepoLink, issue.Index))
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user