增加阻止路由往下走的逻辑
parent
2ab7355a2e
commit
a135007f35
|
@ -31,7 +31,10 @@ export default function (req, res, next) {
|
|||
// 4. 优先执行__main__方法
|
||||
if (app.__main__) {
|
||||
try {
|
||||
await app.__main__()
|
||||
let r = await app.__main__()
|
||||
if (r === false) {
|
||||
return
|
||||
}
|
||||
} catch (err) {
|
||||
return Promise.reject(err)
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@gm5/core",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"type": "module",
|
||||
"description": "Five.js, 一个轻量级的nodejs mvc框架 旨在简单易用, 5分钟即可上手",
|
||||
"author": "yutent <yutent.io@gmail.com>",
|
||||
|
@ -14,7 +14,7 @@
|
|||
"@gm5/views": "^1.0.0",
|
||||
"crypto.js": "^2.0.2",
|
||||
"es.shim": "^2.0.1",
|
||||
"iofs": "^1.5.0"
|
||||
"iofs": "^1.5.3"
|
||||
},
|
||||
"devDependencies": {},
|
||||
"repository": {
|
||||
|
|
Loading…
Reference in New Issue