diff --git a/modules/auth/auth.controller.js b/modules/auth/auth.controller.js index 88de4e7..e636a97 100644 --- a/modules/auth/auth.controller.js +++ b/modules/auth/auth.controller.js @@ -147,8 +147,8 @@ console.log('CREAMOS EL USUARIO EN NUESTRO SISTEMA', newUser); newUser = newUser.toJSON(); newUser = cleanAdminData(newUser); if (appVersion) { - if (user.app_version != appVersion) { - const result = userService._updateLastLoginAndVersionUser(user.id, appVersion); + if (newUser.app_version != appVersion) { + const result = userService._updateLastLoginAndVersionUser(newUser.id, appVersion); console.log('PRUEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEBA>>>> ', result); newUser.app_version = appVersion; }