Add acceptShareRequest

This commit is contained in:
brantje 2016-10-02 16:59:15 +02:00
parent ca408ef0a3
commit b56bda459a
No known key found for this signature in database
GPG key ID: 5FF1D117F918687F
4 changed files with 16 additions and 4 deletions

View file

@ -72,6 +72,16 @@ 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);

View file

@ -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);

File diff suppressed because one or more lines are too long

View file

@ -270,7 +270,7 @@
HH:mm:ss'}}
</td>
<td>
<span class="link">Accept</span> | <span class="link">Decline</span>
<span class="link" ng-click="acceptShareRequest(share_request)">Accept</span> | <span class="link">Decline</span>
</td>
</tr>
</table>