aboutsummaryrefslogtreecommitdiff
path: root/pkg/app
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/app')
-rw-r--r--pkg/app/home/home.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/pkg/app/home/home.go b/pkg/app/home/home.go
index d0d3582..478fd21 100644
--- a/pkg/app/home/home.go
+++ b/pkg/app/home/home.go
@@ -8,7 +8,6 @@ import (
"archives/pkg/config"
"archives/pkg/database"
"archives/pkg/models"
- "github.com/go-pg/pg/v10/orm"
"net/http"
"time"
)
@@ -29,11 +28,7 @@ func ComputeTemplateData() interface{} {
for _, mailingList := range config.IndexMailingLists() {
var messages []*models.Message
database.DBCon.Model(&messages).
- WhereGroup(func(q *orm.Query) (*orm.Query, error) {
- q = q.WhereOr(`subject LIKE '[` + mailingList[0] + `]%'`).
- WhereOr(`subject LIKE 'Re: [` + mailingList[0] + `]%'`)
- return q, nil
- }).
+ Where("list = ?", mailingList[0]).
Order("date DESC").
Limit(5).
Select()