diff options
Diffstat (limited to 'lib/getPost.ts')
-rw-r--r-- | lib/getPost.ts | 7 |
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; } |