diff --git a/services/layout.service.ts b/services/layout.service.ts index a7f8d8ce..ea0a8d3c 100644 --- a/services/layout.service.ts +++ b/services/layout.service.ts @@ -1,8 +1,8 @@ import {Injectable} from '@angular/core'; -import {HttpClient, HttpErrorResponse} from "@angular/common/http"; +import {HttpClient, HttpErrorResponse} from '@angular/common/http'; import {throwError} from 'rxjs'; import {CustomOptions} from './servicesUtils/customOptions.class'; -import {catchError} from "rxjs/operators"; +import {catchError} from 'rxjs/operators'; @Injectable() export class LayoutService { @@ -22,26 +22,22 @@ export class LayoutService { saveLayout(pid: string, url: string, layout: any) { LayoutService.removeNulls(layout); - return this.http.post(url + 'community/' + pid + '/updateLayout', JSON.stringify(layout), CustomOptions.getAuthOptionsWithBody()) - //.map(res => res.json()) + return this.http.post(url + 'community/' + pid + '/layout', JSON.stringify(layout), CustomOptions.getAuthOptionsWithBody()) .pipe(catchError(this.handleError)); } getLayout(pid: string, url: string) { return this.http.get(url + 'community/' + pid + '/layout') - //.map(res => res.json()) .pipe(catchError(this.handleError)); } loadDefaultLayout(pid: string, url: string) { return this.http.post(url + 'community/' + pid + '/resetLayout', null, CustomOptions.getAuthOptionsWithBody()) - //.map(res => res.json()) .pipe(catchError(this.handleError)); } - mockLayout():any { - - return this.http.get("./assets/customizationOptions.json") ; + mockLayout(): any { + return this.http.get('./assets/customizationOptions.json') ; }