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(core): use "router.all" method when RequestMethod is set to ALL #6237

Merged
merged 2 commits into from
Jan 27, 2021

Conversation

kamilmysliwiec
Copy link
Member

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

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

What is the current behavior?

Issue Number: #1799

What is the new behavior?

Does this PR introduce a breaking change?

[x] Yes
[ ] No

Other information

@coveralls
Copy link

Pull Request Test Coverage Report for Build c4dadeb1-1450-47c7-b20f-7a22648d0034

  • 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 94.741%

Totals Coverage Status
Change from base Build 5f34f114-dc47-48ba-8274-cb2425e38332: 0.0%
Covered Lines: 5080
Relevant Lines: 5362

💛 - Coveralls

@kamilmysliwiec kamilmysliwiec changed the base branch from master to 8.0.0 January 27, 2021 11:13
@kamilmysliwiec kamilmysliwiec merged commit 87991f6 into 8.0.0 Jan 27, 2021
@delete-merged-branch delete-merged-branch bot deleted the fix/use-router-all branch January 27, 2021 11:16
This was referenced Jul 7, 2021
@ensellure ensellure mentioned this pull request Nov 24, 2021
2 tasks
@omar-dulaimi
Copy link

Hello @kamilmysliwiec

I'm currently getting undefined when accessing

req.route

The code I have is as follows:

main.ts

async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  app.use(middleware);
  await app.listen(3000);
}
bootstrap();

inside the middleware function:

import { Request, Response, NextFunction } from 'express';

export function middleware(req: Request, res: Response, next: NextFunction) {
  console.log(req.route);
  next();
}

Using latest Nestjs 8.4.5

Am I doing something wrong?

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

Successfully merging this pull request may close these issues.

3 participants