mirror of https://github.com/portainer/portainer
				
				
				
			fix(volume-browser): move volume id to query params (#2338)
							parent
							
								
									3422662191
								
							
						
					
					
						commit
						275fcf5587
					
				|  | @ -1,22 +1,22 @@ | |||
| angular.module('portainer.agent') | ||||
| .factory('Browse', ['$resource', 'API_ENDPOINT_ENDPOINTS', 'EndpointProvider', function BrowseFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider) { | ||||
|   'use strict'; | ||||
|   return $resource(API_ENDPOINT_ENDPOINTS + '/:endpointId/docker/browse/:id/:action', { | ||||
|   return $resource(API_ENDPOINT_ENDPOINTS + '/:endpointId/docker/browse/:action', { | ||||
|     endpointId: EndpointProvider.endpointID | ||||
|   }, | ||||
|   { | ||||
|     ls: { | ||||
|       method: 'GET', isArray: true, params: { id: '@id', action: 'ls' } | ||||
|       method: 'GET', isArray: true, params: { action: 'ls' } | ||||
|     }, | ||||
|     get: { | ||||
|       method: 'GET', params: { id: '@id', action: 'get' }, | ||||
|       method: 'GET', params: { action: 'get' }, | ||||
|       transformResponse: browseGetResponse | ||||
|     }, | ||||
|     delete: { | ||||
|       method: 'DELETE', params: { id: '@id', action: 'delete' } | ||||
|       method: 'DELETE', params: { action: 'delete' } | ||||
|     }, | ||||
|     rename: { | ||||
|       method: 'PUT', params: { id: '@id', action: 'rename' } | ||||
|       method: 'PUT', params: { action: 'rename' } | ||||
|     } | ||||
|   }); | ||||
| }]); | ||||
|  |  | |||
|  | @ -4,15 +4,15 @@ angular.module('portainer.agent') | |||
|   var service = {}; | ||||
| 
 | ||||
|   service.ls = function(volumeId, path) { | ||||
|     return Browse.ls({ 'id': volumeId, 'path': path }).$promise; | ||||
|     return Browse.ls({ volumeID: volumeId, path: path }).$promise; | ||||
|   }; | ||||
| 
 | ||||
|   service.get = function(volumeId, path) { | ||||
|     return Browse.get({ 'id': volumeId, 'path': path }).$promise; | ||||
|     return Browse.get({ volumeID: volumeId, path: path }).$promise; | ||||
|   }; | ||||
| 
 | ||||
|   service.delete = function(volumeId, path) { | ||||
|     return Browse.delete({ 'id': volumeId, 'path': path }).$promise; | ||||
|     return Browse.delete({ volumeID: volumeId, path: path }).$promise; | ||||
|   }; | ||||
| 
 | ||||
|   service.rename = function(volumeId, path, newPath) { | ||||
|  | @ -20,7 +20,7 @@ angular.module('portainer.agent') | |||
|       CurrentFilePath: path, | ||||
|       NewFilePath: newPath | ||||
|     }; | ||||
|     return Browse.rename({ 'id': volumeId }, payload).$promise; | ||||
|     return Browse.rename({ volumeID: volumeId }, payload).$promise; | ||||
|   }; | ||||
| 
 | ||||
|   return service; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Chaim Lev-Ari
						Chaim Lev-Ari