-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove redudant CheckUnit calls in router #2627
Remove redudant CheckUnit calls in router #2627
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2627 +/- ##
======================================
Coverage 27.3% 27.3%
======================================
Files 86 86
Lines 17139 17139
======================================
Hits 4680 4680
Misses 11781 11781
Partials 678 678 Continue to review full report at Codecov.
|
@@ -479,7 +479,7 @@ func RegisterRoutes(m *macaron.Macaron) { | |||
// FIXME: should use different URLs but mostly same logic for comments of issue and pull reuqest. | |||
// So they can apply their own enable/disable logic on routers. | |||
m.Group("/issues", func() { | |||
m.Combo("/new", repo.MustEnableIssues).Get(context.RepoRef(), repo.NewIssue). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems no replacement for this removal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handler in parent func, line 509, use context.CheckUnit(models.UnitTypeIssues)
LGTM |
LGTM |
As title, little speed improvement.