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:
2025-11-30 17:04:15 +00:00
parent 54b6f018cf
commit 3d58c5b244
3 changed files with 26 additions and 13 deletions

View File

@@ -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,

View File

@@ -68,10 +68,10 @@ router.get("/post/:post_index", (req, res) => {
config,
})
}
if (config.enable_hitcount) {
data.increment_hitcount(postID)
}
if (typeof post["deleted"] == "undefined" || post["deleted"] == false) {
else if (typeof post["deleted"] == "undefined" || post["deleted"] == false) {
if (config.enable_hitcount) {
data.increment_hitcount(postID)
}
res.render("pages/post",
{
config,