Skip to content

Commit

Permalink
Order notifications by date desc
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwoberts committed Oct 10, 2024
1 parent 064e252 commit 91bdc05
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/services/sqlstore/postgres/notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func getActiveNotifications(ctx context.Context, q *query.GetActiveNotifications
LEFT JOIN users u ON u.id = n.author_id
WHERE n.tenant_id = $1 AND n.user_id = $2
AND (n.read = false OR n.updated_at > CURRENT_DATE - INTERVAL '30 days')
ORDER BY n.updated_at DESC
`, tenant.ID, user.ID)
if err != nil {
return errors.Wrap(err, "failed to get active notifications")
Expand Down

0 comments on commit 91bdc05

Please sign in to comment.