Skip to content
New issue

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

解析不出 controller action #26

Open
kerryChen95 opened this issue Apr 18, 2022 · 1 comment
Open

解析不出 controller action #26

kerryChen95 opened this issue Apr 18, 2022 · 1 comment

Comments

@kerryChen95
Copy link

kerryChen95 commented Apr 18, 2022

问题表现

解析不出 controller action

复现数据示例

// app/router.ts
router
  .get(
    'path/to/foo',
    middlewareBar,
    // 注意末尾有逗号
    app.controller.foo.action,
  )

根本原因

34, 35行解析得太理想化了,建议在单元测试中补充边界case。

image

@JsonMa
Copy link
Owner

JsonMa commented Apr 18, 2022

问题表现

解析不出 controller action

复现数据示例

// app/router.ts
router
  .get(
    'path/to/foo',
    middlewareBar,
    // 注意末尾有逗号
    app.controller.foo.action,
  )

根本原因

34, 35行解析得太理想化了,建议在单元测试中补充边界case。

image

👍🏻,欢迎提PR哦!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants