about summary refs log tree commit diff
path: root/api
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-01-29 10:56:31 +0100
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-01-29 10:56:31 +0100
commit1c046bd96752feb1bbc0fb0e7b5fca94f299664a (patch)
treea2c5993f2c39846fef8e39c2496563edb1422c66 /api
parenta46cabb3ed27fc099f0eb68c4b073fea6615e822 (diff)
downloadpuszcza-1c046bd96752feb1bbc0fb0e7b5fca94f299664a.tar.gz
puszcza-1c046bd96752feb1bbc0fb0e7b5fca94f299664a.zip
Add apiUrl
Diffstat (limited to 'api')
-rw-r--r--api/index.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/api/index.js b/api/index.js
index 5658365..7843302 100644
--- a/api/index.js
+++ b/api/index.js
@@ -1,7 +1,10 @@
-import Kronikarz from 'kronikarz'
+export const apiUrl = 'https://puszcza.netlify.com/api'
 
-const POSTS_PATH = './content/wpisy'
-
-const k = new Kronikarz(POSTS_PATH)
-
-export default k
+export const parsePosts = (posts) =>
+  posts.map((post) => ({
+    title: post.title,
+    image: post.image,
+    description: post.description,
+    route: post.path,
+    meta: post.meta,
+  }))