add rules
This commit is contained in:
parent
711a799482
commit
8c00723e16
3 changed files with 44 additions and 1 deletions
9
routes/info.js
Normal file
9
routes/info.js
Normal 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;
|
|
@ -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' }
|
||||
];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue