mirror of https://github.com/portainer/portainer
refactor(docker): remove EndpointProvider from commit [EE-5641] (#9123)
parent
f02ede00b3
commit
599d214e50
|
@ -1,14 +1,11 @@
|
|||
angular.module('portainer.docker').factory('Commit', [
|
||||
'$resource',
|
||||
'API_ENDPOINT_ENDPOINTS',
|
||||
'EndpointProvider',
|
||||
function CommitFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider) {
|
||||
function CommitFactory($resource, API_ENDPOINT_ENDPOINTS) {
|
||||
'use strict';
|
||||
return $resource(
|
||||
API_ENDPOINT_ENDPOINTS + '/:endpointId/docker/commit',
|
||||
{
|
||||
endpointId: EndpointProvider.endpointID,
|
||||
},
|
||||
API_ENDPOINT_ENDPOINTS + '/:environmentId/docker/commit',
|
||||
{},
|
||||
{
|
||||
commitContainer: { method: 'POST', params: { container: '@id', repo: '@repo' }, ignoreLoadingBar: true },
|
||||
}
|
||||
|
|
|
@ -260,7 +260,7 @@ angular.module('portainer.docker').controller('ContainerController', [
|
|||
const registryModel = $scope.config.RegistryModel;
|
||||
const imageConfig = ImageHelper.createImageConfigForContainer(registryModel);
|
||||
try {
|
||||
await Commit.commitContainer({ id: $transition$.params().id, repo: imageConfig.fromImage }).$promise;
|
||||
await Commit.commitContainer({ environmentId: endpoint.Id }, { id: $transition$.params().id, repo: imageConfig.fromImage }).$promise;
|
||||
Notifications.success('Image created', $transition$.params().id);
|
||||
$state.reload();
|
||||
} catch (err) {
|
||||
|
|
Loading…
Reference in New Issue