data.getdata() is fully implemented

I think it all works now...

Signed-off-by: deadvey <deadvey@deadvey.com>
This commit is contained in:
2025-09-24 19:31:32 +01:00
parent e597fd78f7
commit 22a7983737
10 changed files with 28 additions and 16 deletions

View File

@@ -38,19 +38,19 @@ router.get(`${config.edit_account_base_url}/:user_id`, (req,res) => {
res.render("forms/edit_account", {
config,
locale,
user: users[userID],
user: data.getdata('users', userID),
userID
});
}); // /delete_account
router.get(`${config.edit_post_base_url}/:post_id`, (req,res) => {
const post_id = req.params.post_id
const post = posts[post_id]
const user = users[post['userID']]
const postID = req.params.post_id
const post = data.getdata('posts', postID)
const user = data.getdata('users', post.userID)
res.render("forms/edit_post", {
config,
locale,
post,
post_id,
postID,
user,
});
}); // /edit/:post_id