Conversation
…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
approved these changes
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.