From 45d5ea5a68291cb42759167f5cc77734fa99a360 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Tue, 10 Dec 2024 00:04:01 +0800 Subject: [PATCH] :bug: Fix featured post query statement issue --- pkg/internal/http/api/recommendation_api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/internal/http/api/recommendation_api.go b/pkg/internal/http/api/recommendation_api.go index 741f5f6..1097bb3 100644 --- a/pkg/internal/http/api/recommendation_api.go +++ b/pkg/internal/http/api/recommendation_api.go @@ -26,7 +26,7 @@ func listRecommendation(c *fiber.Ctx) error { }) tx := database.C.Where("id IN ?", postIdx) - newPosts, err := services.ListPost(tx, featuredMax, 0, " DESC") + newPosts, err := services.ListPost(tx, featuredMax, 0, "id ASC") if err != nil { return fiber.NewError(fiber.StatusInternalServerError, err.Error()) }