1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

move sync upon login to vault controller initiated via state params.

This commit is contained in:
Kyle Spearrin
2016-09-26 20:29:23 -04:00
parent a59f7a4afc
commit d49f0fcac3
7 changed files with 29 additions and 25 deletions

View File

@@ -1,8 +1,8 @@
angular
.module('bit.services')
.factory('loginService', function (cryptoService, apiService, userService, tokenService, $q, syncService,
$rootScope, siteService, folderService) {
.factory('loginService', function (cryptoService, apiService, userService, tokenService, $q, $rootScope, siteService,
folderService) {
var _service = {};
_service.logIn = function (email, masterPassword) {
@@ -22,7 +22,6 @@
if (response.profile) {
userService.setUserId(response.profile.id, function () {
userService.setEmail(response.profile.email, function () {
syncService.fullSync(function () { });
deferred.resolve(response);
});
});
@@ -52,7 +51,6 @@
tokenService.setToken(response.token, function () {
userService.setUserId(response.profile.id, function () {
userService.setEmail(response.profile.email, function () {
syncService.fullSync(function () { });
deferred.resolve(response);
});
});