Sakai services updates
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
export default class CountryService {
|
||||
export class CountryService {
|
||||
getCountries() {
|
||||
return fetch('demo/data/countries.json')
|
||||
return fetch('/demo/data/countries.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
@@ -1,32 +1,18 @@
|
||||
export default class CustomerService {
|
||||
export class CustomerService {
|
||||
getCustomersSmall() {
|
||||
return fetch('demo/data/customers-small.json')
|
||||
return fetch('/demo/data/customers-small.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getCustomersMedium() {
|
||||
return fetch('demo/data/customers-medium.json')
|
||||
return fetch('/demo/data/customers-medium.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getCustomersLarge() {
|
||||
return fetch('demo/data/customers-large.json')
|
||||
return fetch('/demo/data/customers-large.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getCustomersXLarge() {
|
||||
return fetch('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,12 +1,36 @@
|
||||
export default class NodeService {
|
||||
export class NodeService {
|
||||
getFiles() {
|
||||
return fetch('/demo/data/files.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getLazyFiles() {
|
||||
return fetch('/demo/data/files-lazy.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getFilesystem() {
|
||||
return fetch('/demo/data/filesystem.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getLazyFilesystem() {
|
||||
return fetch('/demo/data/filesystem-lazy.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getTreeTableNodes() {
|
||||
return fetch('demo/data/treetablenodes.json')
|
||||
return fetch('/demo/data/treetablenodes.json')
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.root);
|
||||
}
|
||||
|
||||
getTreeNodes() {
|
||||
return fetch('demo/data/treenodes.json')
|
||||
return fetch('/demo/data/treenodes.json')
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.root);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export default class PhotoService {
|
||||
export class PhotoService {
|
||||
getImages() {
|
||||
return fetch('demo/data/photos.json')
|
||||
return fetch('/demo/data/photos.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
@@ -1,18 +1,30 @@
|
||||
export default class ProductService {
|
||||
export class ProductService {
|
||||
getProductsSmall() {
|
||||
return fetch('demo/data/products-small.json')
|
||||
return fetch('/demo/data/products-small.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getProducts() {
|
||||
return fetch('demo/data/products.json')
|
||||
return fetch('/demo/data/products.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getProductsMixed() {
|
||||
return fetch('/demo/data/products-mixed.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getProductsWithOrdersSmall() {
|
||||
return fetch('demo/data/products-orders-small.json')
|
||||
return fetch('/demo/data/products-orders-small.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
getProductsWithOrdersLarge() {
|
||||
return fetch('/demo/data/products-orders.json', { headers: { 'Cache-Control': 'no-cache' } })
|
||||
.then((res) => res.json())
|
||||
.then((d) => d.data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user