mirror of
				https://github.com/nextcloud/passman.git
				synced 2025-10-31 15:56:00 +08:00 
			
		
		
		
	Added angularjs ShareService api methods
Fixed route method
This commit is contained in:
		
							parent
							
								
									ee919c1159
								
							
						
					
					
						commit
						ea997a1ce0
					
				
					 2 changed files with 13 additions and 1 deletions
				
			
		|  | @ -51,7 +51,7 @@ return [ | |||
| 		['name' => 'share#getVaultsByUser', 'url' => '/api/v2/sharing/vaults/{user_id}', 'verb' => 'GET'], | ||||
|         ['name' => 'share#applyIntermediateShare', 'url' => '/api/v2/sharing/share', 'verb' => 'POST'], | ||||
|         ['name' => 'share#savePendingRequest', 'url' => '/api/v2/sharing/save', 'verb' => 'POST'], | ||||
|         ['name' => 'share#getPendingRequests', 'url' => '/api/v2/sharing/pending', 'verb' => 'POST'], | ||||
|         ['name' => 'share#getPendingRequests', 'url' => '/api/v2/sharing/pending', 'verb' => 'GET'], | ||||
| 
 | ||||
| 
 | ||||
| 		//Internal API
 | ||||
|  |  | |||
|  | @ -49,6 +49,18 @@ angular.module('passmanApp') | |||
| 					} | ||||
| 				}); | ||||
| 			}, | ||||
| 			getPendingRequests: function () { | ||||
| 				var queryUrl = OC.generateUrl('apps/passman/api/v2/sharing/pending'); | ||||
| 				return $http.get(queryUrl); | ||||
| 			}, | ||||
| 			saveSharingRequest: function (request, crypted_shared_key) { | ||||
| 				var queryUrl = OC.generateUrl('apps/passman/api/v2/sharing/save'); | ||||
| 				return $http.post(queryUrl, { | ||||
| 					item_guid: request.item_guid, | ||||
| 					target_vault_guid: request.target_vault_guid, | ||||
| 					final_shared_key: crypted_shared_key | ||||
| 				}); | ||||
| 			}, | ||||
| 			encryptSharedCredential: function(credential, sharedKey){ | ||||
| 				var _credential = angular.copy(credential); | ||||
| 				var encrypted_fields = CredentialService.getEncryptedFields(); | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue