typestack / routing-controllers

Create structured, declarative and beautifully organized class-based controllers with heavy decorators usage in Express / Koa using TypeScript and Routing Controllers Framework.
MIT License
4.4k stars 394 forks source link

Async code in UseBefore (express). Return of action is executed before middleware executed. #112

Closed idchlife closed 7 years ago

idchlife commented 7 years ago

I'm trying to get passport and passport-local working, but always getting

0|server   | Error: Can't set headers after they are sent.

I have this async function in passport LocalStrategy

image

And this in controller:

image

idchlife commented 7 years ago

For anybody experiencing something odd like this.

It's double @Post() decorator. I had exact same @Post("/login") in another action. It broke something.

Sooo... Issue resolved :D

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.