Skip to content

Commit 2dc525e

Browse files
author
Invers3
committed
Update getPosts.js
Testing
1 parent a38ea32 commit 2dc525e

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

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

1111
var posts = '';
1212
files.map(file => {
13-
posts += file + "\n"
13+
posts += postsDir + '/' + file + "\n"
1414
});
1515

1616
return {

0 commit comments

Comments
 (0)