summary refs log tree commit diff
path: root/lib/getPost.ts
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-01-28 11:55:03 +0100
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-01-28 11:55:03 +0100
commit9f75ff1d2d5ebf34c040474e836e125f80253365 (patch)
tree523c52b9dd158e21d9247b58d81c655102323a26 /lib/getPost.ts
parentc11d7a84aa59e9b1179a9834129b2d776bab8bca (diff)
downloadkronikarz-9f75ff1d2d5ebf34c040474e836e125f80253365.tar.gz
kronikarz-9f75ff1d2d5ebf34c040474e836e125f80253365.zip
Add Post class
Diffstat (limited to 'lib/getPost.ts')
-rw-r--r--lib/getPost.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/getPost.ts b/lib/getPost.ts
index 2555215..6e90b1f 100644
--- a/lib/getPost.ts
+++ b/lib/getPost.ts
@@ -1,5 +1,4 @@
-import { parsePost } from "./parsePost";
-import { Post } from "./interfaces";
+import Post from "./Post";
 
 interface getPostArgument {
   year: string;
@@ -14,6 +13,6 @@ export function getPost(
 ): Post {
   const filePath = `${path}/${year}/${month}/${day}/${title}.md`;
 
-  const post = parsePost(filePath);
-  return post;
+  const post = new Post(filePath);
+    return post;
 }