From bfecb0e29f4a955f61326f19b410628dae18226b Mon Sep 17 00:00:00 2001 From: "mail_yanpeng@163.com" Date: Tue, 22 Jan 2019 15:29:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=A6=E6=83=85=E8=AF=84=E8=AE=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- filter/Security.go | 4 ++-- service/CommentService.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/filter/Security.go b/filter/Security.go index 38a97ad..9d2a801 100644 --- a/filter/Security.go +++ b/filter/Security.go @@ -9,8 +9,8 @@ var FilterAdmin = func(ctx *context.Context) { url := ctx.Input.URI() refer := ctx.Input.Refer() logs.Info(url) - logs.Info(refer) - logs.Info("https://www.aiprose.com"+url) + //logs.Info(refer) + //logs.Info("https://www.aiprose.com"+url) if "https://www.aiprose.com"+url == refer { ctx.Input.SetData("refresh", true) } diff --git a/service/CommentService.go b/service/CommentService.go index 7597dc0..155d222 100644 --- a/service/CommentService.go +++ b/service/CommentService.go @@ -9,7 +9,7 @@ import ( func FindCommentByBlog(bid int64) ([]*models.Comment, error) { var comms []*models.Comment o := orm.NewOrm() - _, err := o.QueryTable(&models.Comment{}).Filter("Pid", 0).OrderBy("-Ctime").All(&comms) + _, err := o.QueryTable(&models.Comment{}).Filter("Pid", 0).Filter("BlogId",bid).OrderBy("-Ctime").All(&comms) if err != nil { return nil, err }