Skip to content

feat: return online_count in user subscription API#820

Open
onesyue wants to merge 1 commit intocedar2025:masterfrom
onesyue:feat/subscribe-online-count
Open

feat: return online_count in user subscription API#820
onesyue wants to merge 1 commit intocedar2025:masterfrom
onesyue:feat/subscribe-online-count

Conversation

@onesyue
Copy link
Copy Markdown

@onesyue onesyue commented Mar 20, 2026

Summary

  • Add online_count to the ->select([...]) array in the getSubscribe() method of UserController.php
  • The online_count column already exists in the v2_user table but was not included in the query, so it was never returned in the subscription API response
  • This allows frontends to display the user's current online device count alongside other subscription info (device_limit, transfer usage, etc.)

Test plan

  • Verify GET /api/v1/user/getSubscribe now includes online_count in the response
  • Confirm no regression on existing subscription fields
  • Check that frontends consuming this endpoint can render the new field

🤖 Generated with Claude Code

The online_count column already exists in the v2_user table but was not
included in the getSubscribe() select list, preventing frontends from
displaying the user's current online device count.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant