fix unauthed bug and icons
This commit is contained in:
parent
cede9d3021
commit
9cdf2326b8
3 changed files with 130 additions and 2 deletions
|
@ -31,6 +31,7 @@ async function auther(req, res, next) {
|
|||
|
||||
if (!token) {
|
||||
res.auth = {};
|
||||
next();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -66,8 +67,9 @@ function initr(req, res, next) {
|
|||
if (!res.auth || !res.auth.valid) {
|
||||
headerCtx = [
|
||||
{ link: '/walls/get/home', icon: '/icon.svg', name: 'DervNet' },
|
||||
{ link: '/you/login', icon: '/walls.svg', name: 'Log in' },
|
||||
{ link: '/you/new', icon: '/walls.svg', name: 'Join' }
|
||||
{ link: '/walls/list', icon: '/walls.svg', name: 'Explore' },
|
||||
{ link: '/you/login', icon: '/login.svg', name: 'Log in' },
|
||||
{ link: '/you/new', icon: '/join.svg', name: 'Join' }
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue