From e83e92b05445219c8ccffe1019514cb3e7a4a2d1 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Wed, 16 Oct 2024 21:07:53 +0800 Subject: [PATCH] :bug: Fix notification order... again --- .idea/workspace.xml | 6 +++--- pkg/internal/server/api/notifications_api.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 77aebcd..85c614e 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,7 +4,7 @@ - @@ -178,7 +177,8 @@ - true diff --git a/pkg/internal/server/api/notifications_api.go b/pkg/internal/server/api/notifications_api.go index dfe1917..304230a 100644 --- a/pkg/internal/server/api/notifications_api.go +++ b/pkg/internal/server/api/notifications_api.go @@ -32,7 +32,7 @@ func getNotifications(c *fiber.Ctx) error { if err := tx. Limit(take). Offset(offset). - Order("read_at DESC, created_at"). + Order("read_at DESC, created_at DESC"). Find(¬ifications).Error; err != nil { return fiber.NewError(fiber.StatusInternalServerError, err.Error()) }