changed how data is read from the database and consolodated syndation feeds into just 2 files.

This commit is contained in:
2026-06-01 13:53:58 +01:00
parent 1a0b16feb2
commit 5a14b125d2
7 changed files with 82 additions and 41 deletions
+1 -1
View File
@@ -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", {