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

fix: serverless app more method #1034

Merged
merged 6 commits into from
May 11, 2021
Merged

Conversation

echosoar
Copy link
Member

@echosoar echosoar commented May 8, 2021

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

@echosoar echosoar requested a review from czy88840616 May 8, 2021 07:18
@gitpod-io
Copy link

gitpod-io bot commented May 8, 2021

@codecov-commenter
Copy link

codecov-commenter commented May 8, 2021

Codecov Report

Merging #1034 (9cd24a6) into 2.x (5e76090) will decrease coverage by 0.15%.
The diff coverage is 53.84%.

Impacted file tree graph

@@            Coverage Diff             @@
##              2.x    #1034      +/-   ##
==========================================
- Coverage   85.98%   85.82%   -0.16%     
==========================================
  Files         212      212              
  Lines        8191     8227      +36     
  Branches     1601     1557      -44     
==========================================
+ Hits         7043     7061      +18     
- Misses       1102     1115      +13     
- Partials       46       51       +5     
Impacted Files Coverage Δ
packages-serverless/serverless-app/src/utils.ts 55.00% <53.84%> (-4.10%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5e76090...9cd24a6. Read the comment docs.

let isAddToTrigger = false;
const { path, method } = func.functionTriggerMetadata;
let methodList = [].concat(method || []);
if (methodList.includes('any') || methodList.includes('all')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里应该拿不到 any 和 all 了。

func.functionTriggerMetadata.method = methodList;
}
// 避免重复路径创建多个trigger
const httpTrigger = allFunc[funcName].events.find(event => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

现在重复路径会抛错,不可能出现。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同一个方法上面没法添加多个装饰器?@get@post 都加在一个方法上面

Copy link
Member

@czy88840616 czy88840616 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

改改?

@czy88840616 czy88840616 merged commit 9c44c3f into 2.x May 11, 2021
@czy88840616 czy88840616 deleted the fix/serverless-app-more-method branch May 11, 2021 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants