Relocated services

This commit is contained in:
Cagatay Civici
2022-11-30 20:36:32 +03:00
parent 1a3880c077
commit 77815b43ce
15 changed files with 13 additions and 13 deletions
+21
View File
@@ -0,0 +1,21 @@
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);
}
}