Relocated services
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
const contextPath = import.meta.env.BASE_URL;
|
||||
export default class CountryService {
|
||||
getCountries() {
|
||||
return fetch(contextPath + 'demo/data/countries.json')
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
const contextPath = import.meta.env.BASE_URL;
|
||||
export default class CustomerService {
|
||||
getCustomersSmall() {
|
||||
return fetch(contextPath + 'demo/data/customers-small.json')
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getCustomersMedium() {
|
||||
return fetch(contextPath + 'demo/data/customers-medium.json')
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getCustomersLarge() {
|
||||
return fetch(contextPath + 'demo/data/customers-large.json')
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getCustomersXLarge() {
|
||||
return fetch(contextPath + 'demo/data/customers-xlarge.json')
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getCustomers(params) {
|
||||
const queryParams = Object.keys(params)
|
||||
.map((k) => encodeURIComponent(k) + '=' + encodeURIComponent(params[k]))
|
||||
.join('&');
|
||||
return fetch('https://www.primefaces.org//demo/data/customers?' + queryParams).then((res) => res.json());
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
const contextPath = import.meta.env.BASE_URL;
|
||||
export default class NodeService {
|
||||
getTreeTableNodes() {
|
||||
return fetch(contextPath + 'demo/data/treetablenodes.json')
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.root);
|
||||
}
|
||||
|
||||
getTreeNodes() {
|
||||
return fetch(contextPath + 'demo/data/treenodes.json')
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.root);
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
const contextPath = import.meta.env.BASE_URL;
|
||||
export default class PhotoService {
|
||||
getImages() {
|
||||
return fetch(contextPath + 'demo/data/photos.json')
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
const contextPath = import.meta.env.BASE_URL;
|
||||
|
||||
export default class ProductService {
|
||||
getProductsSmall() {
|
||||
return fetch(contextPath + 'demo/data/products-small.json')
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getProducts() {
|
||||
return fetch(contextPath + 'demo/data/products.json')
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getProductsWithOrdersSmall() {
|
||||
return fetch(contextPath + 'demo/data/products-orders-small.json')
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user