Skip to content

Commit d4c1a5f

Browse files
author
Invers3
committed
Update getPosts.js
testing
1 parent 9562b12 commit d4c1a5f

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
@@ -6,9 +6,9 @@ exports.handler = async function(){
66
try {
77

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

11-
const posts = files.filter(file => file.endsWith('.json')).map(file => {
11+
/*const posts = files.filter(file => file.endsWith('.json')).map(file => {
1212
const content = fs.readFileSync(path.join(postsDir, file), 'utf-8');
1313
return JSON.parse(content);
1414
});*/

0 commit comments

Comments
 (0)