新增oauth路由匹配
This commit is contained in:
parent
b9d5a1a26d
commit
7ebe1392aa
|
|
@ -46,4 +46,4 @@ export const deepRoutes = [
|
|||
]
|
||||
|
||||
// 不进行组织或个人判断
|
||||
export const specialRoute = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder", "glcc","bindlogin", "softbot","zone", "undefined", "admins"]
|
||||
export const specialRoute = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder", "glcc","bindlogin", "softbot","zone", "undefined", "admins", "oauth"]
|
||||
|
|
@ -51,6 +51,7 @@ export const render = async (req,res)=>{
|
|||
};
|
||||
|
||||
if (_route && !specialRoute.includes(_match.url && _match.url.replace('/', ''))) {
|
||||
console.log('matchRoot:', _match.url)
|
||||
await changeHead(_route, _match.params)
|
||||
} else {
|
||||
return false
|
||||
|
|
@ -103,5 +104,5 @@ export const render = async (req,res)=>{
|
|||
// res.send(prepHTML(html, content))
|
||||
res.send(prepHTML(html, ''))
|
||||
|
||||
store = null
|
||||
// store = null
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ export const changeHead = async ({ key }, params) => {
|
|||
}
|
||||
break;
|
||||
case 'owner':
|
||||
console.log(params);
|
||||
res = await getOwnerInfo(params.owner);
|
||||
data = res.data
|
||||
const name = data.nickname || data.username
|
||||
|
|
|
|||
Loading…
Reference in New Issue