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 }