Files
Learn_System/backend/src/controllers
Maxim Dolgolyov eb19ce3cf9 fix(auth): include avatar_url in login response + lazy refresh stale cache
Login was only returning {id, email, name, role}, so localStorage.ls_user
never had avatar_url for sessions started before today — and the sidebar
fell back to initials forever. Fixes:

  • login response now includes avatar_url
  • renderNavAvatar detects 'undefined' (cache predates the field) vs
    'null' (verified absent) and fires a one-shot /auth/me refresh in
    the background, then re-paints. Self-healing for existing sessions
    without forcing re-login.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-29 15:07:16 +03:00
..
@
2026-05-16 17:01:11 +03:00