Commit 46083d4e44fa82db114a728fcb50c0b2c9606e84

Authored by Yarik
1 parent d3de0b38

Add/update completed

src/app/pages/statements/components/busStop2/busStop2.service.ts
@@ -33,13 +33,13 @@ export class BusStop2Service { @@ -33,13 +33,13 @@ export class BusStop2Service {
33 .catch(this.handleError); 33 .catch(this.handleError);
34 } 34 }
35 update(id: number, data: string): Promise<any> { 35 update(id: number, data: string): Promise<any> {
36 - return this.http.post(this.url + '/update?id=' + id + '&data=' + data, {}, { headers: this.headers }) 36 + return this.http.post(this.url + '/update?id=' + id, data, { headers: this.headers })
37 .toPromise() 37 .toPromise()
38 .then(response => response.json()) 38 .then(response => response.json())
39 .catch(this.handleError); 39 .catch(this.handleError);
40 } 40 }
41 create(data: string): Promise<any> { 41 create(data: string): Promise<any> {
42 - return this.http.post(this.url + '/create?data=' + data, {}, { headers: this.headers }) 42 + return this.http.post(this.url + '/create', data, { headers: this.headers })
43 .toPromise() 43 .toPromise()
44 .then(response => response.json()) 44 .then(response => response.json())
45 .catch(this.handleError); 45 .catch(this.handleError);
src/app/pages/statements/components/busStop2/busStop2.ts
@@ -5,7 +5,7 @@ export class busStop2 { @@ -5,7 +5,7 @@ export class busStop2 {
5 settlementId: number; 5 settlementId: number;
6 locationLeft: string; 6 locationLeft: string;
7 locationRight: string; 7 locationRight: string;
8 - surfaceTypeId: string; 8 + surfaceTypeId: number;
9 areaStopAvailability: string; 9 areaStopAvailability: string;
10 areaLandAvailability: string; 10 areaLandAvailability: string;
11 pocketAvailability: string; 11 pocketAvailability: string;