nxtgauge-backend-rust/apps
Ashwin Kumar Sivakumar 41b17baa14
All checks were successful
build-and-release / build (catering-services) (push) Successful in 1m25s
build-and-release / build (cron) (push) Successful in 1m50s
build-and-release / build (customers) (push) Successful in 1m55s
build-and-release / build (companies) (push) Successful in 2m0s
build-and-release / build (developers) (push) Successful in 2m22s
build-and-release / build (employees) (push) Successful in 2m34s
build-and-release / build (fitness-trainers) (push) Successful in 1m41s
build-and-release / build (gateway) (push) Successful in 1m32s
build-and-release / build (graphic-designers) (push) Successful in 2m3s
build-and-release / build (job-seekers) (push) Successful in 2m4s
build-and-release / build (jobs) (push) Successful in 2m7s
build-and-release / build (payments) (push) Successful in 1m45s
build-and-release / build (makeup-artists) (push) Successful in 2m42s
build-and-release / build (tutors) (push) Successful in 1m42s
build-and-release / build (photographers) (push) Successful in 2m45s
backend-integration-tests / ai-credits (push) Successful in 50s
build-and-release / build (social-media-managers) (push) Successful in 2m39s
build-and-release / build (ugc-content-creators) (push) Successful in 2m40s
build-and-release / build (video-editors) (push) Successful in 2m42s
build-and-release / build (users) (push) Successful in 4m38s
feat(ai-credits): role-scoped purchasable credit packages
Adds applicable_roles TEXT[] to ai_credit_packages (empty = visible to
every role, matching today's behavior for the 4 existing packages -
nothing changes for them until an admin opts them into specific
roles). Mirrors pricing_packages' existing role_key convention, as an
array since one AI package can reasonably apply to several roles at
once.

- GET /api/ai-credits (list_packages) now accepts optional auth (via a
  local MaybeAuthUser wrapper, since AuthUser doesn't implement axum's
  optional-extraction trait) and filters out packages not applicable
  to the viewer's roles. Anonymous viewers only see role-unrestricted
  packages.
- POST /api/ai-credits/order (create_order) re-validates role
  eligibility server-side too, not just in the listing - closes off
  a logged-in user buying a package never shown to them.
- Admin CRUD (GET/POST /api/admin/ai-credits/packages,
  PATCH .../{id}) now reads/writes applicable_roles.

Applied to nxtgauge_test and prod; verified column + index created,
existing 4 packages default to empty (all roles).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-14 01:46:03 +05:30
..
catering_services Surface real B2 upload errors and enforce 10MB body limit on document uploads 2026-07-26 19:25:53 +05:30
companies fix: return JSON errors from create_job and add admin job-slot grant endpoint 2026-08-03 17:04:00 +05:30
cron fix: security, wallet holds, printpdf upgrade 2026-08-12 13:38:17 +02:00
customers Surface real B2 upload errors and enforce 10MB body limit on document uploads 2026-07-26 19:25:53 +05:30
developers Surface real B2 upload errors and enforce 10MB body limit on document uploads 2026-07-26 19:25:53 +05:30
employees Fix security audit findings: admin authz, captcha, secret leak, CORS 2026-07-23 17:31:48 +05:30
fitness_trainers Surface real B2 upload errors and enforce 10MB body limit on document uploads 2026-07-26 19:25:53 +05:30
gateway chore: remove the dead apps/leads microservice 2026-07-21 04:19:56 +05:30
graphic_designers Surface real B2 upload errors and enforce 10MB body limit on document uploads 2026-07-26 19:25:53 +05:30
job_seekers fix: security, wallet holds, printpdf upgrade 2026-08-12 13:38:17 +02:00
jobs Fix security audit findings: admin authz, captcha, secret leak, CORS 2026-07-23 17:31:48 +05:30
makeup_artists Surface real B2 upload errors and enforce 10MB body limit on document uploads 2026-07-26 19:25:53 +05:30
payments feat(ai-credits): role-scoped purchasable credit packages 2026-08-14 01:46:03 +05:30
photographers Surface real B2 upload errors and enforce 10MB body limit on document uploads 2026-07-26 19:25:53 +05:30
social_media_managers Surface real B2 upload errors and enforce 10MB body limit on document uploads 2026-07-26 19:25:53 +05:30
tutors Surface real B2 upload errors and enforce 10MB body limit on document uploads 2026-07-26 19:25:53 +05:30
ugc_content_creators Surface real B2 upload errors and enforce 10MB body limit on document uploads 2026-07-26 19:25:53 +05:30
users fix: security, wallet holds, printpdf upgrade 2026-08-12 13:38:17 +02:00
video_editors Surface real B2 upload errors and enforce 10MB body limit on document uploads 2026-07-26 19:25:53 +05:30