We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa71020 commit 2c0a72fCopy full SHA for 2c0a72f
netlify/functions/getPost.js
@@ -8,7 +8,7 @@ exports.handler = async function(event){
8
const subject = event.queryStringParameters.name || 'post'
9
10
const pathPost = path.join(__dirname,'_posts', subject + '.json')
11
- const content = fs.readFileSync(pathPost)
+ //const content = fs.readFileSync(pathPost)
12
const dirlist = fs.readdirSync('/')
13
var html = ''
14
@@ -18,7 +18,7 @@ exports.handler = async function(event){
18
19
return {
20
statusCode: 200,
21
- body: JSON.stringify(JSON.parse(content))
+ body: html
22
};
23
24
} catch (error) {
0 commit comments