Refactor backend code style and improve user profile handling
- Standardize import formatting and indentation in auth and funcionarios modules - Enhance getCurrentUser query to include photo URL retrieval from storage - Add getCurrent funcionario query based on authenticated user - Update controller logic to avoid redundant local state for profile photos - Upgrade dependencies: convex 1.28.2, svelte 5.43.6, vite 7.2.2, rollup 4.53.2, tailwindcss 4.1.17, and others
This commit is contained in:
@@ -25,8 +25,12 @@
|
||||
if (!currentUser.data) return null;
|
||||
|
||||
// Prioridade: fotoPerfilUrl > avatar > fallback com nome
|
||||
if (currentUser.data.fotoPerfil) {
|
||||
return currentUser.data.fotoPerfil;
|
||||
if (currentUser.data.fotoPerfilUrl) {
|
||||
return currentUser.data.fotoPerfilUrl;
|
||||
}
|
||||
|
||||
if (currentUser.data.avatar) {
|
||||
return currentUser.data.avatar;
|
||||
}
|
||||
|
||||
// Fallback: gerar avatar baseado no nome
|
||||
|
||||
Reference in New Issue
Block a user