We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
module.exports = function (io, _io, routes) { const router = Object.keys(routes).reduce((result, route) => { io.on(route, noop); result[route] = routes[route]; return result; }, {}); return async (ctx) => { if (router[ctx.event]) { const { event, data, socket } = ctx; ctx.res = await router[ctx.event]({ event, data, socket, io, _io, }); } }; };
routes入参和router局部变量,不都是同样内容吗?
The text was updated successfully, but these errors were encountered:
不好意思, 这块逻辑确实有问题, 回头修改一下
Sorry, something went wrong.
5c5a65a
No branches or pull requests
routes入参和router局部变量,不都是同样内容吗?
The text was updated successfully, but these errors were encountered: