Some minor changes to data handling error messages
and fixed a issue occuring in the forms routs that used the old parameters for data.getdata
This commit is contained in:
@@ -38,14 +38,14 @@ router.get(`${config.edit_account_base_url}/:user_id`, (req,res) => {
|
||||
res.render("forms/edit_account", {
|
||||
config,
|
||||
locale,
|
||||
user: data.getdata('users', userID),
|
||||
user: data.getdata('users', 'id', userID),
|
||||
userID
|
||||
});
|
||||
}); // /delete_account
|
||||
router.get(`${config.edit_post_base_url}/:post_id`, (req,res) => {
|
||||
const postID = req.params.post_id
|
||||
const post = data.getdata('posts', postID)
|
||||
const user = data.getdata('users', post.userID)
|
||||
const post = data.getdata('posts','id', postID)
|
||||
const user = data.getdata('users', 'id', post.userID)
|
||||
res.render("forms/edit_post", {
|
||||
config,
|
||||
locale,
|
||||
|
||||
Reference in New Issue
Block a user