Cybersecurity-Projects/PROJECTS/beginner/canary-token-generator/backend/internal/token
CarterPerez-dev ca67cf6313 fix(canary-phase11): use repo-supplied HasMore/NextCursor before rollup
Both audits flagged buildPage as a non-blocking but worth-cleaning nit:
it re-derived next_cursor from len(events) and the last event's ID
rather than using the HasMore + NextCursor flags that
event.Repository.ListByToken already computes via the LIMIT+1 peek
trick. Both calculations agreed today, but the duplication would
mask a divergence if the repo's pagination logic ever evolved
(e.g. switched to opaque token cursors).

Inline buildPage into gatherManageData and use list.HasMore +
list.NextCursor as the authoritative signals. Drops the buildPage
helper. Behavior identical; tests still pass.
2026-05-14 01:12:07 -04:00
..
generators refactor(canary): consolidate realIP into middleware across 5 generators 2026-05-14 00:31:49 -04:00
contract.go feat(canary): event + notify domain — contracts, senders, services 2026-05-14 00:30:42 -04:00
dto.go feat(canary): manage page handlers + DTOs (GET + DELETE /m/{manage_id}) 2026-05-14 01:07:09 -04:00
entity.go feat(canary): Phase 1 — Postgres schema + token & event repositories 2026-05-10 05:47:24 -04:00
handler.go fix(canary-phase11): use repo-supplied HasMore/NextCursor before rollup 2026-05-14 01:12:07 -04:00
handler_test.go feat(canary): manage page handlers + DTOs (GET + DELETE /m/{manage_id}) 2026-05-14 01:07:09 -04:00
repository.go fix(canary): clear pre-audit lint debt + migrate golangci config to v2 2026-05-12 02:49:56 -04:00
repository_test.go fix(canary-phase1): clear all post-phase-1 audit observations + header normalization 2026-05-10 06:15:26 -04:00
service.go feat(canary): event.CountActiveDedup + token.DeleteByManageID for manage page 2026-05-14 01:06:45 -04:00
service_test.go feat(canary): event.CountActiveDedup + token.DeleteByManageID for manage page 2026-05-14 01:06:45 -04:00
types.go feat(canary): token HTTP handlers (API + trigger routes) 2026-05-13 15:16:41 -04:00