Sydication updates
This commit is contained in:
@@ -63,13 +63,13 @@ router.get("/user/:username", (req, res) => {
|
||||
router.get("/post/:post_index", (req, res) => {
|
||||
const postID = parseInt(req.params.post_index)
|
||||
let post = data.getdata('posts','id', postID)[0]
|
||||
if (post == 1) { // data.getdata returns error code 1 if nothing is available
|
||||
if (post.length == 0) { // data.getdata returns error code 1 if nothing is available
|
||||
res.render("partials/message", {
|
||||
message: locale.post_doesnt_exist,
|
||||
config,
|
||||
})
|
||||
}
|
||||
else if (typeof post["deleted"] == "undefined" || post["deleted"] == false) {
|
||||
else {
|
||||
if (config.enable_hitcount) {
|
||||
data.increment_hitcount(postID)
|
||||
}
|
||||
@@ -87,10 +87,6 @@ router.get("/post/:post_index", (req, res) => {
|
||||
func,
|
||||
})
|
||||
}
|
||||
else {
|
||||
console.log("Error loading page")
|
||||
res.redirect(301,"/")
|
||||
}
|
||||
}); // /post/:post_index
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user