Stores who follows which users and playlists, and builds the feeds and
lists made from it. routes/follows.ts serves the caller's own, and
routes/users.ts what any user follows.
Makes followerId follow a public playlist, and notifies its owner.
Following again changes nothing. A follow outlives the playlist going
private, but the feeds and lists skip it while it is.
Makes followerId follow followedUserId, and notifies the followed user.
Following again changes nothing. The follower's other tabs are told.
Returns a page of the public playlists userId follows, most recently
followed first, for their profile and playlists pages. Their dumps are
counted for requestingUserId, null being a signed-out viewer.
Returns a page of the public dumps in the public playlists followerId
follows, optionally only those in categoryId. It feeds the "playlists"
half of the index's "followed" tab. A dump in several of them shows once,
dated by its latest addition.
Returns a page of the users userId follows, most recently followed first,
for their profile page. The users carry their password hash and email: pass
them through toPublicUser before sending them.
Returns a page of the public dumps posted by the users followerId follows,
newest first, optionally only those in categoryId. It feeds the "users"
half of the index's "followed" tab.
Returns the ids of every user and playlist followerId follows, private
playlists included, for GET /api/me/follow.
Makes followerId stop following a playlist, if they did.
Makes followerId stop following followedUserId, if they did.
Usage
import * as mod from "api/services/follow-service.ts";