From 1c046bd96752feb1bbc0fb0e7b5fca94f299664a Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Wed, 29 Jan 2020 10:56:31 +0100 Subject: Add apiUrl --- pages/oboz/2020.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'pages/oboz/2020.vue') diff --git a/pages/oboz/2020.vue b/pages/oboz/2020.vue index 119220d..e26cde6 100644 --- a/pages/oboz/2020.vue +++ b/pages/oboz/2020.vue @@ -44,6 +44,7 @@ import EmptyCampStory from '~/components/Posts/EmptyCampStory' import GoogleDriveLink from '~/components/GoogleDriveLink' import { parsePosts } from '~/components/Posts/PostList' +import { apiUrl } from '~/api' export default { components: { @@ -67,9 +68,7 @@ export default { }, async asyncData() { try { - let posts = await axios.get( - `https://puszcza.netlify.com/api/category/oboz2020.json` - ) + let posts = await axios.get(`${apiUrl}/category/oboz2020.json`) console.log(posts) return { posts: parsePosts(posts.data), -- cgit 1.4.1 From e7823de0c8160b0b7c77ce24040724b82b58b6f7 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Wed, 29 Jan 2020 11:03:54 +0100 Subject: Fix parsePosts location --- pages/oboz/2020.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'pages/oboz/2020.vue') diff --git a/pages/oboz/2020.vue b/pages/oboz/2020.vue index e26cde6..c1b73c4 100644 --- a/pages/oboz/2020.vue +++ b/pages/oboz/2020.vue @@ -43,8 +43,7 @@ import CampMap from '~/components/CampMap' import EmptyCampStory from '~/components/Posts/EmptyCampStory' import GoogleDriveLink from '~/components/GoogleDriveLink' -import { parsePosts } from '~/components/Posts/PostList' -import { apiUrl } from '~/api' +import { apiUrl, parsePosts } from '~/api' export default { components: { -- cgit 1.4.1