瀏覽代碼

Update GRC #100 in pkg

Yoginth 7 年之前
父節點
當前提交
d5f3310e3e
共有 3 個文件被更改,包括 3 次插入2 次删除
  1. 1 0
      routes/repo/http.go
  2. 1 0
      routes/repo/pull.go
  3. 1 2
      routes/user/auth.go

+ 1 - 0
routes/repo/http.go

@@ -45,6 +45,7 @@ func askCredentials(c *context.Context, status int, text string) {
 	c.HandleText(status, text)
 }
 
+// HTTPContexter is a macaron handler
 func HTTPContexter() macaron.Handler {
 	return func(c *context.Context) {
 		if len(setting.HTTP.AccessControlAllowOrigin) > 0 {

+ 1 - 0
routes/repo/pull.go

@@ -40,6 +40,7 @@ const (
 )
 
 var (
+	// PullRequestTemplateCandidates stores PR Templates
 	PullRequestTemplateCandidates = []string{
 		"PULL_REQUEST.md",
 		".gitote/PULL_REQUEST.md",

+ 1 - 2
routes/user/auth.go

@@ -532,9 +532,8 @@ func ForgotPasswdPost(c *context.Context) {
 			c.Data["IsResetSent"] = true
 			c.Success(ForgotPasswordTPL)
 			return
-		} else {
-			c.ServerError("GetUserByEmail", err)
 		}
+		c.ServerError("GetUserByEmail", err)
 		return
 	}