update
parent
90ecb636f0
commit
5ca8f38e40
|
@ -39,7 +39,7 @@ func ApiListProductOfCat(event *linebot.Event) {
|
||||||
data = strings.TrimPrefix(data, "cat=")
|
data = strings.TrimPrefix(data, "cat=")
|
||||||
|
|
||||||
var prods []Product
|
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))
|
columns := make([]*linebot.CarouselColumn, len(prods))
|
||||||
for i, prod := range prods {
|
for i, prod := range prods {
|
||||||
|
|
Loading…
Reference in New Issue