Skip to content

Commit 7b3d8f5

Browse files
author
Invers3
committed
Update getPost.js
testing
1 parent 69ce4b9 commit 7b3d8f5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

netlify/functions/getPost.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@ exports.handler = async function(event){
1313
var html = ''
1414

1515
const recursive = function(dirname){
16+
var acom = ''
1617
const datalist = fs.readdirSync(dirname)
1718
datalist.forEach(function(file){
18-
html += file + "\n"
19+
acom += file + "\n"
1920
})
20-
return html
21+
return acom
2122
}
2223

23-
html = recursive('/')+"<br>"
24-
html += recursive('/home')+"<br>"
24+
html = recursive('/')+"\n"
25+
html += recursive('/home')+"\n"
2526
html += recursive('/var')
2627

2728
return {

0 commit comments

Comments
 (0)