Skip to content

Commit 2e4a658

Browse files
author
Invers3
committed
Update getPosts.js
testing get posts
1 parent 5306202 commit 2e4a658

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

netlify/functions/getPosts.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ const path = require('path');
44
exports.handler = async function(){
55

66
try {
7-
7+
88
const postsDir = path.join(__dirname, '_posts');
9-
const files = fs.readdirSync('/');
9+
const files = fs.readdirSync(postsDir);
1010

1111
var posts = '';
1212
files.map(file => {

0 commit comments

Comments
 (0)