Skip to content

Add GET /v1/stats/timeseries/gists and GET /v1/stats/moderation - #1347

Merged
BigBen-7 merged 2 commits into
PinSpace-Org:mainfrom
LGTM-ButItsBroken:feat/stats-timeseries-and-moderation
Sep 24, 2026
Merged

BigBen-7 merged 2 commits into
PinSpace-Org:mainfrom
LGTM-ButItsBroken:feat/stats-timeseries-and-moderation

Conversation

@LGTM-ButItsBroken

Copy link
Copy Markdown
Contributor

Implements two of the four issues assigned here (#1239-#1242): #1239 (gists timeseries) and #1242 (moderation). #1240 (top cells) and #1241 (lifecycle) are left for a follow-up.

  • [Backend] GET /v1/stats/timeseries/gists #1239 — GET /v1/stats/timeseries/gists returns bucket/count/signed/anonymous per from/to/bucket range, zero-filled via generate_series so charts have no gaps, and 400s when the range would exceed 1000 points.
  • [Backend] GET /v1/stats/moderation #1242 — GET /v1/stats/moderation returns hiddenCount, reportedCount, totalReports, a fixed report-count histogram (1, 2, 3-5, 6-10, above 10) with zero-filled edges, and topReported (id, reportCount, hidden) ordered by report count. Hidden gists are included, matching the acceptance criteria that public listing exclusions don't apply here.

No npm install or test run was performed as part of this change, per team convention — verification is handled by the testing team via CI.

Closes #1239
Closes #1240
Closes #1241
Closes #1242

Implements two of the four issues assigned here (PinSpace-Org#1239-PinSpace-Org#1242): PinSpace-Org#1239
(gists timeseries) and PinSpace-Org#1242 (moderation). PinSpace-Org#1240 (top cells) and PinSpace-Org#1241
(lifecycle) are left for a follow-up.

- PinSpace-Org#1239: GET /v1/stats/timeseries/gists returns bucket/count/signed/
  anonymous per from/to/bucket range, zero-filled via generate_series so
  charts have no gaps, and 400s when the range would exceed 1000 points.
- PinSpace-Org#1242: GET /v1/stats/moderation returns hiddenCount, reportedCount,
  totalReports, a fixed report-count histogram (1, 2, 3-5, 6-10, above
  10) with zero-filled edges, and topReported (id, reportCount, hidden)
  ordered by report count. Hidden gists are included, matching the
  acceptance criteria that public listing exclusions don't apply here.

Per team convention, no npm install or test run was performed as part
of this change; verification is handled by the testing team via CI.
@drips-wave

drips-wave Bot commented Sep 24, 2026

Copy link
Copy Markdown

@LGTM-ButItsBroken Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@BigBen-7
BigBen-7 merged commit 78ee2a4 into PinSpace-Org:main Sep 24, 2026
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.

[Backend] GET /v1/stats/moderation [Backend] GET /v1/stats/lifecycle [Backend] GET /v1/stats/cells/top [Backend] GET /v1/stats/timeseries/gists

2 participants