From eb7553d5e05b9c51b12b525f1a0149630a43bc18 Mon Sep 17 00:00:00 2001 From: dustoair <107600816+dustoair@users.noreply.github.com> Date: Sat, 17 Sep 2022 18:26:30 +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 a22f611..40c8cda 100644 --- a/api/binancePrice.go +++ b/api/binancePrice.go @@ -26,7 +26,7 @@ func GetBinanceLatestPrice(symbol string) float64 { func GetBinanceLatestPrices(symbol string) []BinancePrice { var binancePrices []BinancePrice - global.DB.Where("symbol = ?", symbol).Limit(30).Find(&binancePrices) + global.DB.Where("symbol = ? order by id desc", symbol).Limit(30).Find(&binancePrices) return binancePrices }