refactor: update permissions and clean up Svelte component
- Removed outdated information about the permissions system from the Svelte component. - Added new actions for resource management in the backend, including 'aprovar_ausencias' and 'aprovar_ferias'. - Cleaned up console logs in the user retrieval function for better performance and security.
This commit is contained in:
@@ -562,15 +562,12 @@ export const obterPerfil = query({
|
||||
),
|
||||
handler: async (ctx) => {
|
||||
const usuarioAutenticado = await getCurrentUserFunction(ctx);
|
||||
console.log('Usuario autenticado:', usuarioAutenticado);
|
||||
if (!usuarioAutenticado) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const usuarioAtual = usuarioAutenticado;
|
||||
|
||||
console.log('✅ Usuário encontrado:', usuarioAtual.nome);
|
||||
|
||||
// Buscar fotoPerfil URL se existir
|
||||
let fotoPerfilUrl = null;
|
||||
if (usuarioAtual.fotoPerfil) {
|
||||
|
||||
Reference in New Issue
Block a user