fixed packaging and rewrote http
This commit is contained in:
parent
d34fdb58ca
commit
b8775e2e45
2 changed files with 16 additions and 21 deletions
5
package-lock.json
generated
5
package-lock.json
generated
|
@ -511,11 +511,6 @@
|
||||||
"integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=",
|
"integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"angular-in-memory-web-api": {
|
|
||||||
"version": "0.5.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/angular-in-memory-web-api/-/angular-in-memory-web-api-0.5.1.tgz",
|
|
||||||
"integrity": "sha1-4qIHP+EbwIutcSd0J14nKCY+XOs="
|
|
||||||
},
|
|
||||||
"ansi-html": {
|
"ansi-html": {
|
||||||
"version": "0.0.7",
|
"version": "0.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz",
|
||||||
|
|
|
@ -23,7 +23,7 @@ export class ApiService {
|
||||||
return this.http.post(
|
return this.http.post(
|
||||||
this.apiUrl + url,
|
this.apiUrl + url,
|
||||||
data
|
data
|
||||||
).map( response => response.json() );
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Login API
|
// Login API
|
||||||
|
@ -49,7 +49,7 @@ export class ApiService {
|
||||||
return this.http.post(
|
return this.http.post(
|
||||||
this.apiUrl + '/register',
|
this.apiUrl + '/register',
|
||||||
data
|
data
|
||||||
).map( response => response.json() );
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public login(data) {
|
public login(data) {
|
||||||
|
@ -100,7 +100,7 @@ export class ApiService {
|
||||||
return this.http.post(
|
return this.http.post(
|
||||||
this.apiUrl + '/feedback',
|
this.apiUrl + '/feedback',
|
||||||
data
|
data
|
||||||
).map( response => response.json() );
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// gets transaction list for log
|
// gets transaction list for log
|
||||||
|
@ -113,7 +113,7 @@ export class ApiService {
|
||||||
session_key : key,
|
session_key : key,
|
||||||
page : data
|
page : data
|
||||||
}
|
}
|
||||||
).map( response => response.json() );
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Searches organisations used for transaction submission
|
// Searches organisations used for transaction submission
|
||||||
|
@ -123,7 +123,7 @@ export class ApiService {
|
||||||
return this.http.post(
|
return this.http.post(
|
||||||
this.apiUrl + '/search',
|
this.apiUrl + '/search',
|
||||||
data
|
data
|
||||||
).map( response => response.json() );
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Uploads a transaction
|
// Uploads a transaction
|
||||||
|
@ -133,7 +133,7 @@ export class ApiService {
|
||||||
return this.http.post(
|
return this.http.post(
|
||||||
this.apiUrl + '/upload',
|
this.apiUrl + '/upload',
|
||||||
data
|
data
|
||||||
).map( response => response.json() );
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// gets payroll list for log
|
// gets payroll list for log
|
||||||
|
@ -146,7 +146,7 @@ export class ApiService {
|
||||||
session_key : key,
|
session_key : key,
|
||||||
page : data
|
page : data
|
||||||
}
|
}
|
||||||
).map( response => response.json() );
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// handles Org data added
|
// handles Org data added
|
||||||
|
@ -156,7 +156,7 @@ export class ApiService {
|
||||||
return this.http.post(
|
return this.http.post(
|
||||||
this.apiUrl + '/v1/organisation/payroll/add',
|
this.apiUrl + '/v1/organisation/payroll/add',
|
||||||
data
|
data
|
||||||
).map( response => response.json() );
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public orgSupplier(data) {
|
public orgSupplier(data) {
|
||||||
|
@ -164,7 +164,7 @@ export class ApiService {
|
||||||
return this.http.post(
|
return this.http.post(
|
||||||
this.apiUrl + '/v1/organisation/supplier/add',
|
this.apiUrl + '/v1/organisation/supplier/add',
|
||||||
data
|
data
|
||||||
).map( response => response.json() );
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public orgEmployee(data) {
|
public orgEmployee(data) {
|
||||||
|
@ -172,7 +172,7 @@ export class ApiService {
|
||||||
return this.http.post(
|
return this.http.post(
|
||||||
this.apiUrl + '/v1/organisation/employee/add',
|
this.apiUrl + '/v1/organisation/employee/add',
|
||||||
data
|
data
|
||||||
).map( response => response.json() );
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handles user data interaction
|
// Handles user data interaction
|
||||||
|
@ -207,7 +207,7 @@ export class ApiService {
|
||||||
return this.http.post(
|
return this.http.post(
|
||||||
this.apiUrl + '/user',
|
this.apiUrl + '/user',
|
||||||
{ session_key : key },
|
{ session_key : key },
|
||||||
).map( response => response.json() );
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public accountEditUpdate(data) {
|
public accountEditUpdate(data) {
|
||||||
|
@ -215,7 +215,7 @@ export class ApiService {
|
||||||
return this.http.post(
|
return this.http.post(
|
||||||
this.apiUrl + '/user/account',
|
this.apiUrl + '/user/account',
|
||||||
data
|
data
|
||||||
).map( response => response.json() );
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deletes account details on logout
|
// Deletes account details on logout
|
||||||
|
@ -264,7 +264,7 @@ export class ApiService {
|
||||||
type : type,
|
type : type,
|
||||||
page: page,
|
page: page,
|
||||||
}
|
}
|
||||||
).map( response => response.json() );
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initial Map Data
|
// Initial Map Data
|
||||||
|
@ -273,7 +273,7 @@ export class ApiService {
|
||||||
return this.http.post(
|
return this.http.post(
|
||||||
this.apiUrl + '/v1/supplier/location',
|
this.apiUrl + '/v1/supplier/location',
|
||||||
data
|
data
|
||||||
).map( response => response.json() );
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Basic Customer User stats API
|
// Basic Customer User stats API
|
||||||
|
@ -284,6 +284,6 @@ export class ApiService {
|
||||||
{
|
{
|
||||||
session_key : key,
|
session_key : key,
|
||||||
}
|
}
|
||||||
).map( response => response.json() );
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue