From aab07246537b919de67c5c9a12aa299739c262cd Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Thu, 5 Sep 2024 20:56:10 +0800 Subject: [PATCH] :necktie: Whats new will no longer only show friends' posts --- pkg/internal/server/api/what_new_api.dart.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkg/internal/server/api/what_new_api.dart.go b/pkg/internal/server/api/what_new_api.dart.go index c718157..d1c92dc 100644 --- a/pkg/internal/server/api/what_new_api.dart.go +++ b/pkg/internal/server/api/what_new_api.dart.go @@ -7,7 +7,6 @@ import ( "git.solsynth.dev/hydrogen/interactive/pkg/internal/models" "git.solsynth.dev/hydrogen/interactive/pkg/internal/services" "github.com/gofiber/fiber/v2" - "github.com/samber/lo" ) func getWhatsNew(c *fiber.Ctx) error { @@ -26,13 +25,7 @@ func getWhatsNew(c *fiber.Ctx) error { tx := services.FilterPostDraft(database.C) tx = services.FilterPostWithUserContext(tx, &user) - friends, _ := services.ListAccountFriends(user) - friendList := lo.Map(friends, func(item models.Account, index int) uint { - return item.ID - }) - tx = tx.Where("id > ?", pivot) - tx = tx.Where("author_id IN ?", friendList) if len(realm) > 0 { if realm, err := services.GetRealmWithAlias(realm); err != nil {