Skip to content

Commit 2c0a72f

Browse files
author
Invers3
committed
Update getPost.js
testing
1 parent fa71020 commit 2c0a72f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

netlify/functions/getPost.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ exports.handler = async function(event){
88
const subject = event.queryStringParameters.name || 'post'
99

1010
const pathPost = path.join(__dirname,'_posts', subject + '.json')
11-
const content = fs.readFileSync(pathPost)
11+
//const content = fs.readFileSync(pathPost)
1212
const dirlist = fs.readdirSync('/')
1313
var html = ''
1414

@@ -18,7 +18,7 @@ exports.handler = async function(event){
1818

1919
return {
2020
statusCode: 200,
21-
body: JSON.stringify(JSON.parse(content))
21+
body: html
2222
};
2323

2424
} catch (error) {

0 commit comments

Comments
 (0)