1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-18 21:09:40 +02:00
portainer/app/docker/rest/build.js

28 lines
784 B
JavaScript

import { API_ENDPOINT_ENDPOINTS } from '@/constants';
import { jsonObjectsToArrayHandler } from './response/handlers';
angular.module('portainer.docker').factory('Build', [
'$resource',
function BuildFactory($resource) {
'use strict';
return $resource(
API_ENDPOINT_ENDPOINTS + '/:endpointId/docker/build',
{},
{
buildImage: {
method: 'POST',
ignoreLoadingBar: true,
transformResponse: jsonObjectsToArrayHandler,
isArray: true,
headers: { 'Content-Type': 'application/x-tar' },
},
buildImageOverride: {
method: 'POST',
ignoreLoadingBar: true,
transformResponse: jsonObjectsToArrayHandler,
isArray: true,
},
}
);
},
]);