Commit 34c331342623eb2e4b42911502db1c836203f899
1 parent
a1a13ea147
Exists in
master
fix
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
src/js/controller.js
... | ... | @@ -7,9 +7,9 @@ angular.module('focaLogin') |
7 | 7 | focaLoginService.login($scope.usuario).then(function(datos) { |
8 | 8 | $cookies.put('token', datos.data.token); |
9 | 9 | |
10 | - if (datos.data.chofer) { | |
10 | + if (datos.data.chofer.id) { | |
11 | 11 | $cookies.put('chofer', datos.data.chofer.id); |
12 | - } else if (datos.data.vendedorCobrador) { | |
12 | + } else if (datos.data.vendedorCobrador.CodVen) { | |
13 | 13 | $cookies.put('vendedorCobrador', datos.data.vendedorCobrador.CodVen); |
14 | 14 | } |
15 | 15 |