changed how data is read from the database and consolodated syndation feeds into just 2 files.
This commit is contained in:
@@ -71,7 +71,7 @@ router.post(`${config.site_path}/submit_post`, (req,res) => {
|
||||
fs.writeFileSync(`../data/posts.json`, `${JSON.stringify(posts)}`, 'utf-8');
|
||||
comments.push({'id': id, 'comments': []})
|
||||
fs.writeFileSync(`../data/comments.json`, `${JSON.stringify(comments)}`)
|
||||
res.redirect(302, config.site_path);
|
||||
res.redirect(302, `/post/${id}`);
|
||||
}
|
||||
else {
|
||||
res.render("partials/message", {
|
||||
|
||||
Reference in New Issue
Block a user