- scheduler.ts: collect completed enrollment IDs in loop, single updateMany
after — eliminates N queries per day for completions
- ContentHandler.ts: log Redis cache failures instead of swallowing silently
- index.ts: remove (request as any).user cast — now safe via FastifyJWT
augmentation in types/fastify.d.ts
- types/fastify.d.ts: augment @fastify/jwt FastifyJWT interface so request.user
resolves to {id, role, organizationId} after jwtVerify(), not string|object|Buffer
- delete-user.ts: moved from apps/api root to apps/api/scripts/
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>