data.getdata() is fully implemented
I think it all works now... Signed-off-by: deadvey <deadvey@deadvey.com>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user