diff --git a/app/db.go b/app/db.go index e23f2e1..0d1742a 100644 --- a/app/db.go +++ b/app/db.go @@ -62,7 +62,7 @@ func Paginate(r *Request) func(db *gorm.DB) *gorm.DB { func Search(r *Request, key, query string) func(db *gorm.DB) *gorm.DB { return func(db *gorm.DB) *gorm.DB { if keyword, ok := r.Get(key); ok { - return db.Where(query, keyword) + return db.Where(query, "%"+keyword+"%") } else { return db }