mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage-server
synced 2026-04-12 02:18:18 +00:00
feat: caller cache invalidation endpoint + worklist auth fix
- POST /api/caller/invalidate — clears Redis cache for a phone number - WorklistController: resolves agent name from login cache (avoids currentUser query) - AuthController: caches agent name in Redis during login (keyed by token suffix) - WorklistModule: imports AuthModule (forwardRef for circular dep) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -166,6 +166,12 @@ export class AuthController {
|
||||
}
|
||||
}
|
||||
|
||||
// Cache agent name for worklist resolution (avoids re-querying currentUser with user JWT)
|
||||
const agentFullName = `${workspaceMember?.name?.firstName ?? ''} ${workspaceMember?.name?.lastName ?? ''}`.trim();
|
||||
if (agentFullName) {
|
||||
await this.sessionService.setCache(`agent:name:${accessToken.slice(-16)}`, agentFullName, 86400);
|
||||
}
|
||||
|
||||
return {
|
||||
accessToken,
|
||||
refreshToken: tokens.refreshToken.token,
|
||||
|
||||
Reference in New Issue
Block a user