Commit Graph

7 Commits

Author SHA1 Message Date
Ivan Fontosh 7538458677 Add CORS support for landing download tracking endpoint.
Browsers on ttrpgplayer.ru need preflight and Access-Control-Allow-Origin on POST /v1/track/download.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-06 15:08:21 +08:00
Ivan Fontosh 6d4b74d410 Add download stats, key deletion, batch creation, and newest-first listing.
Track landing downloads per platform/month, support admin delete and bulk key issue, and sort licenses by createdAtSec.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-02 00:21:21 +08:00
Ivan Fontosh 4b568ceb56 Add period-based license keys alongside fixed expiry dates.
New keys default to validDays with countdown starting on first activation; existing expiresAtSec keys behave unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-01 22:46:10 +08:00
Ivan Fontosh e299cfc7dd Revoke licenses by product key instead of shared sub.
Add revokedKeys storage and accept key in admin revoke API so DND/TTRPG keys with the same sub can be revoked independently.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-01 16:44:16 +08:00
Ivan Fontosh 4ac63f2889 Ensure license server always listens under PM2.
Skip auto-listen only when SKIP_LICENSE_LISTEN is set for tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-28 12:54:56 +08:00
Ivan Fontosh a6a0e8adf8 Add admin API to list licenses and create product keys.
Expose GET /v1/admin/licenses and POST /v1/admin/product-keys for the license manager app.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-28 12:35:40 +08:00
Ivan Fontosh d595f4ca5a chore: license server updates and tests
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-11 22:20:21 +08:00