ugghhhh new site_path config option
This commit is contained in:
@@ -9,7 +9,7 @@ const router = express.Router();
|
||||
///////////////////// Standard Pages //////////////////////
|
||||
|
||||
// Timeline
|
||||
router.get("/", (req,res) => {
|
||||
router.get(config.site_path, (req,res) => {
|
||||
// Increment the hitcount
|
||||
if (config.enable_hitcount) {
|
||||
data.increment_hitcount()
|
||||
@@ -31,7 +31,7 @@ router.get("/", (req,res) => {
|
||||
}); // /
|
||||
|
||||
// Users
|
||||
router.get("/user/:username", (req, res) => {
|
||||
router.get(`${config.site_path}/user/:username`, (req, res) => {
|
||||
const userID = func.get_userID(req.params.username)
|
||||
let user = data.getdata('users', 'id', userID)
|
||||
if (userID != -1) {
|
||||
@@ -59,7 +59,7 @@ router.get("/user/:username", (req, res) => {
|
||||
}); // /user/:username
|
||||
|
||||
// Posts
|
||||
router.get("/post/:post_index", (req, res) => {
|
||||
router.get(`${config.site_path}/post/:post_index`, (req, res) => {
|
||||
const postID = parseInt(req.params.post_index)
|
||||
let post = data.getdata('posts','id', postID)
|
||||
if (post == 1) { // data.getdata returns error code 1 if nothing is available
|
||||
@@ -94,7 +94,7 @@ router.get("/post/:post_index", (req, res) => {
|
||||
|
||||
|
||||
// Tags
|
||||
router.get("/tag/:tag", (req,res) => {
|
||||
router.get(`${config.site_path}/tag/:tag`, (req,res) => {
|
||||
const tag = req.params.tag
|
||||
res.render("pages/tag",
|
||||
{
|
||||
@@ -113,7 +113,7 @@ router.get("/tag/:tag", (req,res) => {
|
||||
|
||||
|
||||
// Comments
|
||||
router.get("/comment/:postID-:commentID", (req,res) => {
|
||||
router.get(`${config.site_path}/comment/:postID-:commentID`, (req,res) => {
|
||||
const commentID = parseInt(req.params.commentID);
|
||||
const postID = parseInt(req.params.postID);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user