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: export cont REQUEST_METHOD_MAP from router-method-factory #14349

Merged
merged 1 commit into from
Dec 27, 2024

Conversation

Makkalay
Copy link
Contributor

@Makkalay Makkalay commented Dec 23, 2024

It is useful piece of code for create custom adapter

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • [ x] Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

const REQUEST_METHOD_MAP { *** }

Issue Number: N/A

What is the new behavior?

export const REQUEST_METHOD_MAP { *** }

Does this PR introduce a breaking change?

  • Yes
  • [x ] No

Other information

For example people do that
[type HttpMethods =] = *** (https://github.com/seidelmartin/nest-koa-adapter/blob/d83478e55351be128762836a9cffff0e12b5c234/src/KoaAdapter.ts#L22)

but can use REQUEST_METHOD_MAP

I need for example something like:

m !== REQUEST_METHOD_MAP[RequestMethod.ALL]
          ? REQUEST_METHOD_MAP[m] as Method : undefined

Is useful piece of code for create custom adapter
@coveralls
Copy link

Pull Request Test Coverage Report for Build ede61a1a-12fa-4e14-a246-7aa375263bd8

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 91.912%

Totals Coverage Status
Change from base Build e25bebae-20b1-4a99-b89e-69eb0e86d7a3: 0.0%
Covered Lines: 6818
Relevant Lines: 7418

💛 - Coveralls

@kamilmysliwiec kamilmysliwiec merged commit 8950ef0 into nestjs:master Dec 27, 2024
3 checks passed
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