1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-05 05:45:22 +02:00

refactor(handlers): remove duplicated code (#127)

This commit is contained in:
Anthony Lapenna 2016-08-17 13:50:55 +12:00 committed by GitHub
parent fb67769928
commit 54fd9561f0
2 changed files with 6 additions and 19 deletions

View file

@ -97,11 +97,11 @@ angular.module('uifordocker.services', ['ngResource', 'ngSanitize'])
inspect: {method: 'GET', params: {id: '@id', action: 'json'}},
push: {
method: 'POST', params: {action: 'push', id: '@tag'},
isArray: true, transformResponse: pushImageHandler
isArray: true, transformResponse: jsonObjectsToArrayHandler
},
create: {
method: 'POST', params: {action: 'create', fromImage: '@fromImage', tag: '@tag'},
isArray: true, transformResponse: createImageHandler
isArray: true, transformResponse: jsonObjectsToArrayHandler
},
remove: {
method: 'DELETE', params: {id: '@id'},
@ -115,7 +115,7 @@ angular.module('uifordocker.services', ['ngResource', 'ngSanitize'])
return $resource(Settings.url + '/events', {}, {
query: {
method: 'GET', params: {since: '@since', until: '@until'},
isArray: true, transformResponse: queryEventsHandler
isArray: true, transformResponse: jsonObjectsToArrayHandler
}
});
}])