fix: feed repitition
This commit is contained in:
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user