diff --git a/js/app/controllers/credential.js b/js/app/controllers/credential.js
index 3053df92..78f3ff25 100644
--- a/js/app/controllers/credential.js
+++ b/js/app/controllers/credential.js
@@ -71,7 +71,17 @@ angular.module('passmanApp')
});
}
});
-
+
+ $scope.acceptShareRequest = function(share_request){
+ console.log('Accepted share request', share_request);
+ var crypted_shared_key = '';
+ ShareService.saveSharingRequest(share_request, crypted_shared_key).then(function (result) {
+ console.log(result)
+ })
+ };
+
+
+
$scope.addCredential = function () {
var new_credential = CredentialService.newCredential();
var enc_c = CredentialService.encryptCredential(new_credential);
diff --git a/js/app/services/shareservice.js b/js/app/services/shareservice.js
index 033516d1..f8d949d2 100644
--- a/js/app/services/shareservice.js
+++ b/js/app/services/shareservice.js
@@ -63,7 +63,9 @@ angular.module('passmanApp')
item_guid: request.item_guid,
target_vault_guid: request.target_vault_guid,
final_shared_key: crypted_shared_key
- });
+ }).then(function (response) {
+ return response.data;
+ })
},
encryptSharedCredential: function(credential, sharedKey){
var _credential = angular.copy(credential);
diff --git a/js/templates.js b/js/templates.js
index 9f1fe7a6..47d93681 100644
--- a/js/templates.js
+++ b/js/templates.js
@@ -113,7 +113,7 @@ angular.module('views/share_credential.html', []).run(['$templateCache', functio
angular.module('views/show_vault.html', []).run(['$templateCache', function($templateCache) {
'use strict';
$templateCache.put('views/show_vault.html',
- '
{{filtered_credentials}}| {{ ::credential.label}} {{ ::tag.text}} |
');
+ '{{filtered_credentials}}| {{ ::credential.label}} {{ ::tag.text}} |
');
}]);
angular.module('views/vaults.html', []).run(['$templateCache', function($templateCache) {
diff --git a/templates/views/show_vault.html b/templates/views/show_vault.html
index 46d06b85..38bc0f42 100644
--- a/templates/views/show_vault.html
+++ b/templates/views/show_vault.html
@@ -270,7 +270,7 @@
HH:mm:ss'}}
- Accept | Decline
+ Accept | Decline
|