add rules

This commit is contained in:
biglyderv 2025-03-02 02:45:13 -05:00
parent 711a799482
commit 8c00723e16
Signed by: biglyderv
GPG key ID: 0E2EB0B4CD7397B5
3 changed files with 44 additions and 1 deletions

9
routes/info.js Normal file
View file

@ -0,0 +1,9 @@
import { Router } from "express";
const router = Router();
router.get('/tou', (req, res, next) => {
res.ctx.mainPage = 'tou'
res.ctx.mainCtx = {};
next();
})
export default router;

View file

@ -30,7 +30,8 @@ const routers = {
'/api/file/comment': './routes/commenter.js',
'/walls': './routes/walls.js',
'/comment': './routes/comment.js',
'/users': './routes/user.js'
'/users': './routes/user.js',
'/info': './routes/info.js'
}
function doAliases(app) {
@ -79,6 +80,7 @@ function initr(req, res, next) {
{ link: '/walls/get/hub/main/0', icon: '/icon.svg', name: 'DervNet' },
{ link: '/walls/list', icon: '/walls.svg', name: 'Explore' },
{ link: '/users/' + (res.auth ? res.auth.username : ''), icon: '/login.svg', name: 'You' },
{ link: '/info/tou', icon: '/icon.svg', name: 'Rules' },
{ link: '/you/logout', icon: '/logout.svg', name: 'Leave' }
];