Skip to content

Commit c94cc6b

Browse files
author
Invers3
committed
Uodate getPosts.js
Testing
1 parent d5f3627 commit c94cc6b

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

88
const postsDir = path.join(process.cwd(), '_posts');
9-
const files = fs.readdirSync(postsDir);
9+
/*const files = fs.readdirSync(postsDir);
1010
1111
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);
14-
});
14+
});*/
1515

1616
return {
1717
statusCode: 200,

0 commit comments

Comments
 (0)