Background
GET /users/:address returns the full user profile without follower/following
counts. Clients that display a "Followers: 142 | Following: 38" badge must make
separate list calls with limit=1 just to get the count. A dedicated lightweight
endpoint is more efficient.
Goal
Add GET /users/:address/follow-stats returning counts only.
Requirements
-
In UsersService, add:
-
Add to UsersController as a @Public() route.
-
Add unit tests in src/users/users.service.spec.ts:
Acceptance criteria
- Public endpoint.
- Returns accurate counts without returning the lists.
Background
GET /users/:addressreturns the full user profile without follower/followingcounts. Clients that display a "Followers: 142 | Following: 38" badge must make
separate list calls with
limit=1just to get the count. A dedicated lightweightendpoint is more efficient.
Goal
Add
GET /users/:address/follow-statsreturning counts only.Requirements
In
UsersService, add:Add to
UsersControlleras a@Public()route.Add unit tests in
src/users/users.service.spec.ts:Acceptance criteria