mirror of
https://github.com/nextcloud/passman.git
synced 2025-10-06 19:45:54 +08:00
Use route param
This commit is contained in:
parent
ddb97721d0
commit
e8df9295ed
1 changed files with 3 additions and 7 deletions
|
@ -9,8 +9,8 @@
|
|||
*/
|
||||
angular.module('passmanApp')
|
||||
.controller('CredentialCtrl', ['$scope', 'VaultService', 'SettingsService', '$location', 'CredentialService',
|
||||
'$rootScope', 'FileService', 'EncryptService', 'TagService', '$timeout', 'NotificationService', 'CacheService', 'ShareService', 'SharingACL', '$interval', '$filter',
|
||||
function ($scope, VaultService, SettingsService, $location, CredentialService, $rootScope, FileService, EncryptService, TagService, $timeout, NotificationService, CacheService, ShareService, SharingACL, $interval, $filter) {
|
||||
'$rootScope', 'FileService', 'EncryptService', 'TagService', '$timeout', 'NotificationService', 'CacheService', 'ShareService', 'SharingACL', '$interval', '$filter', '$routeParams',
|
||||
function ($scope, VaultService, SettingsService, $location, CredentialService, $rootScope, FileService, EncryptService, TagService, $timeout, NotificationService, CacheService, ShareService, SharingACL, $interval, $filter, $routeParams) {
|
||||
$scope.active_vault = VaultService.getActiveVault();
|
||||
if (!SettingsService.getSetting('defaultVault') || !SettingsService.getSetting('defaultVaultPass')) {
|
||||
if (!$scope.active_vault) {
|
||||
|
@ -27,13 +27,9 @@ angular.module('passmanApp')
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$scope.show_spinner = true;
|
||||
var fetchCredentials = function () {
|
||||
|
||||
VaultService.getVault($scope.active_vault).then(function (vault) {
|
||||
|
||||
VaultService.getVault({guid: $routeParams.vault_id}).then(function (vault) {
|
||||
var vaultKey = angular.copy($scope.active_vault.vaultKey);
|
||||
var _credentials = angular.copy(vault.credentials);
|
||||
vault.credentials = [];
|
||||
|
|
Loading…
Add table
Reference in a new issue