baseUrl added

This commit is contained in:
Tuğçe Küçükoğlu 2022-12-09 16:41:56 +03:00
parent 3e6476c735
commit 4364c463c0
7 changed files with 28 additions and 14 deletions

View file

@ -1,12 +1,14 @@
const baseUrl = process.env.NODE_ENV === 'production' ? '/primevue-nuxt/' : '/';
export default class NodeService {
getTreeTableNodes() {
return fetch('/demo/data/treetablenodes.json')
return fetch(baseUrl + 'demo/data/treetablenodes.json')
.then((res) => res.json())
.then((d) => d.root);
}
getTreeNodes() {
return fetch('/demo/data/treenodes.json')
return fetch(baseUrl + 'demo/data/treenodes.json')
.then((res) => res.json())
.then((d) => d.root);
}