fix: gate /world behind ensureLoggedIn middleware

This commit is contained in:
Julian Lam
2026-02-23 13:37:01 -05:00
parent de4f016f50
commit bcfdbf7c97
2 changed files with 1 additions and 4 deletions

View File

@@ -16,10 +16,6 @@ const helpers = require('../helpers');
const controller = module.exports;
controller.list = async function (req, res) {
if (!req.uid) {
return helpers.redirect(res, '/recent?cid=-1', false);
}
const { topicsPerPage } = await user.getSettings(req.uid);
const page = parseInt(req.query.page, 10) || 1;
const start = Math.max(0, (page - 1) * topicsPerPage);