bug fix
numbers should be parsed Signed-off-by: deadvey <deadvey@deadvey.com>
This commit is contained in:
@@ -60,7 +60,7 @@ router.get("/user/:username", (req, res) => {
|
||||
|
||||
// Posts
|
||||
router.get("/post/:post_index", (req, res) => {
|
||||
const postID = req.params.post_index
|
||||
const postID = parseInt(req.params.post_index)
|
||||
let post = data.getdata('posts', postID)
|
||||
if (post == 1) { // data.getdata returns error code 1 if nothing is available
|
||||
res.render("partials/message", {
|
||||
|
Reference in New Issue
Block a user