From 4dda25a3c35bc15ab05803232d26a66dc7791176 Mon Sep 17 00:00:00 2001 From: dustoair <107600816+dustoair@users.noreply.github.com> Date: Sat, 17 Sep 2022 18:32:13 +0800 Subject: [PATCH] id desc --- api/binancePrice.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/binancePrice.go b/api/binancePrice.go index c93c008..1f71ee2 100644 --- a/api/binancePrice.go +++ b/api/binancePrice.go @@ -27,7 +27,7 @@ func GetBinanceLatestPrice(symbol string) float64 { func GetBinanceLatestPrices(symbol string) []BinancePrice { var binancePrices []BinancePrice - global.DB.Where("symbol = ? order by id desc", symbol).Find(&binancePrices) + global.DB.Where("symbol = ? ", symbol).Order("id desc").Find(&binancePrices) //global.DB.Where("symbol = ? order by id desc", symbol).Limit(30).Find(&binancePrices) return binancePrices }