1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 15:23:33 +00:00

refactoring with promises throughout

This commit is contained in:
Kyle Spearrin
2016-09-16 23:47:50 -04:00
parent 2fcf3ff129
commit ac4d5836b2
11 changed files with 94 additions and 223 deletions

View File

@@ -1,13 +1,13 @@
angular
.module('bit.vault')
.controller('vaultViewSiteController', function ($scope, $state, $stateParams, siteService, cipherService, tldjs, toastr) {
.controller('vaultViewSiteController', function ($scope, $state, $stateParams, siteService, tldjs, toastr, $q) {
var returnScrollY = $stateParams.returnScrollY;
var returnSearchText = $stateParams.returnSearchText;
$scope.site = null;
siteService.get($stateParams.siteId, function (site) {
cipherService.decryptSite(site).then(function (model) {
$q.when(site.decrypt()).then(function (model) {
$scope.site = model;
if (model.password) {