fix: feed repitition

This commit is contained in:
Krispire Admin
2026-06-14 00:18:11 +05:30
parent 8a2bdf945a
commit 2afbbfa0f2
6 changed files with 263 additions and 11 deletions
+8
View File
@@ -259,6 +259,14 @@ func (h *PostHandler) Feed(w http.ResponseWriter, r *http.Request) {
response.JSON(w, http.StatusOK, posts)
}
// FeedReset — POST /feed/reset. Clears the caller's home-feed seen-set so the
// next page starts fresh. Called on logout and on page unload (the realtime
// socket dropping) to evict the set promptly rather than waiting for its TTL.
func (h *PostHandler) FeedReset(w http.ResponseWriter, r *http.Request) {
h.svc.ResetFeed(r.Context(), middleware.UserID(r.Context()))
response.NoContent(w)
}
// FeedNewUsers — GET /feed/new-users. Up to 5 accounts that joined in the last
// 24h, for the feed's "new on the platform" discovery strip. Returns [] when
// there are none (the client hides the section).