diff --git a/api_line_products.go b/api_line_products.go index f8a3b8e..ccbf351 100644 --- a/api_line_products.go +++ b/api_line_products.go @@ -39,7 +39,7 @@ func ApiListProductOfCat(event *linebot.Event) { data = strings.TrimPrefix(data, "cat=") var prods []Product - DB.Find(prods, "id in (select product_id from product_categories where category_name = ?)", data) + DB.Find(&prods, "id in (select product_id from product_categories where category_name = ?)", data) columns := make([]*linebot.CarouselColumn, len(prods)) for i, prod := range prods {