diff options
Diffstat (limited to 'lib/getPosts.ts')
-rw-r--r-- | lib/getPosts.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/getPosts.ts b/lib/getPosts.ts index c363c67..814f6d8 100644 --- a/lib/getPosts.ts +++ b/lib/getPosts.ts @@ -1,5 +1,4 @@ -import { Post } from "./interfaces"; -import { parsePost } from "./parsePost"; +import Post from "./Post"; import { readDir } from "./utils"; function getPosts(path: string): Array<Post> { @@ -14,7 +13,7 @@ function getPosts(path: string): Array<Post> { files.forEach((file: string) => { const fsRoute = `${path}/${year}/${month}/${day}/${file}`; try { - const post = parsePost(fsRoute); + const post = new Post(fsRoute); routesArray.push(post); } catch (err) { console.log(err); |