From c33b208bafc95cedaddb2edf349b7e6271ddff97 Mon Sep 17 00:00:00 2001 From: Michail Kuznetsov Date: Wed, 31 May 2017 13:23:21 +0000 Subject: [PATCH] Fix dashboard factory creation (#5249) --- dashboard/src/components/api/che-factory.factory.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/dashboard/src/components/api/che-factory.factory.ts b/dashboard/src/components/api/che-factory.factory.ts index 375b5d788f..6f8c719e2b 100644 --- a/dashboard/src/components/api/che-factory.factory.ts +++ b/dashboard/src/components/api/che-factory.factory.ts @@ -73,13 +73,7 @@ export class CheFactory { updateFactory: {method: 'PUT', url: '/api/factory/:factoryId'}, getFactoryContentFromWorkspace: {method: 'GET', url: '/api/factory/workspace/:workspaceId'}, getFactoryParameters: {method: 'POST', url: '/api/factory/resolver/'}, - createFactoryByContent: { - method: 'POST', - url: '/api/factory', - isArray: false, - headers: {'Content-Type': undefined}, - transformRequest: angular.identity - }, + createFactoryByContent: {method: 'POST', url: '/api/factory'}, getFactories: { method: 'GET', url: '/api/factory/find?creator.userId=:userId&maxItems=:maxItems&skipCount=:skipCount', @@ -421,10 +415,7 @@ export class CheFactory { * @returns {ng.IPromise} the promise */ createFactoryByContent(factoryContent: any): ng.IPromise { - let formDataObject = new FormData(); - formDataObject.append('factory', factoryContent); - - return this.remoteFactoryAPI.createFactoryByContent({}, formDataObject).$promise; + return this.remoteFactoryAPI.createFactoryByContent({}, factoryContent).$promise; } /**