From c52f0ac6ce79a8e1f4342219ad3651b9966b78b2 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sat, 19 Oct 2019 14:20:13 +0200 Subject: Add baseUrl --- pages/kronika/index.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pages/kronika') diff --git a/pages/kronika/index.vue b/pages/kronika/index.vue index 13322f4..20341e9 100644 --- a/pages/kronika/index.vue +++ b/pages/kronika/index.vue @@ -32,7 +32,9 @@ export default { methods: { getPosts() { if (this.posts.length < 1) { - this.$axios.get(`/api/posts.json`).then(r => (this.posts = r.data)) + this.$axios + .get(`${process.env.baseUrl}/api/posts.json`) + .then(r => (this.posts = r.data)) } console.log(this.posts) } -- cgit 1.4.1