chore: update supporting code for UUID identity (refs #216)
- audit-log: JOIN on user_profiles.id instead of auth0_sub - backup: use userContext.userId instead of auth0Sub - ocr: use request.userContext.userId instead of request.user.sub - user-profile controller: use getById() with UUID instead of getOrCreateProfile() - user-profile service: accept UUID userId for all admin-focused methods - user-profile repository: fix admin JOIN aliases from auth0_sub to id Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -126,7 +126,7 @@ export class AuditLogRepository {
|
||||
al.resource_type, al.resource_id, al.details, al.created_at,
|
||||
up.email as user_email
|
||||
FROM audit_logs al
|
||||
LEFT JOIN user_profiles up ON al.user_id = up.auth0_sub
|
||||
LEFT JOIN user_profiles up ON al.user_id = up.id
|
||||
${whereClause}
|
||||
ORDER BY al.created_at DESC
|
||||
LIMIT $${nextParamIndex} OFFSET $${nextParamIndex + 1}
|
||||
@@ -170,7 +170,7 @@ export class AuditLogRepository {
|
||||
al.resource_type, al.resource_id, al.details, al.created_at,
|
||||
up.email as user_email
|
||||
FROM audit_logs al
|
||||
LEFT JOIN user_profiles up ON al.user_id = up.auth0_sub
|
||||
LEFT JOIN user_profiles up ON al.user_id = up.id
|
||||
${whereClause}
|
||||
ORDER BY al.created_at DESC
|
||||
LIMIT ${MAX_EXPORT_RECORDS}
|
||||
|
||||
Reference in New Issue
Block a user