Issue personal single-use codes from a template promotion

FeatureSecurityService
Shipped
September 12, 2026 at 8:22 AM UTC
Author
Kamo
Commit
9578ca0

The kamocrm.com site hunt hands each solver a code of their own, and only the first N solvers ever get one. A shared code could not do that: the first solver to post it would hand the discount to everyone. - PromotionCodeIssuer: an INACTIVE promotion is the template; its maxRedemptions is how many personal codes may be issued. Slots are taken by a conditional UPDATE so two replicas cannot over-issue. A caller may name the code, and asking again for an issued code returns it without taking a second slot. - **************** on the cluster internal secret. - The public promotions feed drops single-use codes, so a personal code can never be listed or advertised in the homepage hero.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing