Skip to content

Staging -> Main - #518

Merged
sanaderi merged 4 commits into
mainfrom
staging
Jul 20, 2026
Merged

Staging -> Main#518
sanaderi merged 4 commits into
mainfrom
staging

Conversation

@gamatraindev

Copy link
Copy Markdown
Collaborator

No description provided.

sanaderi and others added 4 commits July 18, 2026 11:26
…e downloads

Downloads previously returned a bare, untranslated "InsufficientBalance" error
and silently dropped the upgrade suggestions GameService already computes,
unlike the richer games/spends v2 response. Bring the download endpoint in
line with that existing convention.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…sions

Surface upgrade suggestions on insufficient-balance downloads
A failed local balance check on POST api/v1/downloads still called gama-api's
download endpoint, which flips gama-api's own paid flag as a side effect of
serving the URL. A retried request would then see paid=true and return the
file for free, with no charge or quota consumption. Fixed by checking a
separate, confirmed side-effect-free gama-api detail endpoint (per content
type) before ever calling the download endpoint - the download endpoint is
now only reached once payment is already settled.

While at it, extend charging to Multimedia/Exam downloads (previously always
free, since their download endpoints report no price) using the same
detail-endpoint price check.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Fix free-download bypass on POST downloads; charge Multimedia/Exam
@sanaderi
sanaderi merged commit e333ced into main Jul 20, 2026
2 checks passed
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.

2 participants