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

changed(Context): unify requestContext #541

Merged
merged 1 commit into from
Nov 21, 2019
Merged

Conversation

chentsulin
Copy link
Collaborator

@chentsulin chentsulin commented Nov 21, 2019

unify requestContext to

type RequestContext = {
  method: string;
  path: string;
  query: Record<string, string>;
  headers: Record<string, string>;
};

instead of using { req, res } or ctx

It's the first step to make all request serializable.

@codecov-io
Copy link

codecov-io commented Nov 21, 2019

Codecov Report

Merging #541 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #541      +/-   ##
==========================================
- Coverage   81.99%   81.99%   -0.01%     
==========================================
  Files          97       97              
  Lines        3949     3948       -1     
  Branches      948      948              
==========================================
- Hits         3238     3237       -1     
  Misses        678      678              
  Partials       33       33
Impacted Files Coverage Δ
packages/bottender/src/context/ConsoleContext.ts 100% <ø> (ø) ⬆️
packages/bottender/src/bot/MessengerConnector.ts 91.8% <ø> (ø) ⬆️
packages/bottender/src/context/LineContext.ts 72.39% <ø> (ø) ⬆️
packages/bottender-express/src/createMiddleware.ts 100% <ø> (ø) ⬆️
packages/bottender/src/context/MessengerContext.ts 97.2% <ø> (ø) ⬆️
packages/bottender/src/bot/SlackConnector.ts 92.07% <ø> (ø) ⬆️
packages/bottender/src/bot/LineConnector.ts 92.63% <ø> (ø) ⬆️
packages/bottender/src/bot/TelegramConnector.ts 98.64% <ø> (ø) ⬆️
packages/bottender/src/bot/ConsoleConnector.ts 100% <ø> (ø) ⬆️
packages/bottender/src/types.ts 100% <ø> (ø) ⬆️
... and 7 more

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 1b39864...33eaf56. Read the comment docs.

@chentsulin chentsulin merged commit 30341c1 into master Nov 21, 2019
@chentsulin chentsulin deleted the unify-requestContext branch November 21, 2019 05:39
@chentsulin chentsulin mentioned this pull request Dec 2, 2019
darkbtf pushed a commit that referenced this pull request Dec 9, 2019
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

Successfully merging this pull request may close these issues.

3 participants