Very simple general question:
@Controller('something')class SomeController { @Get() foobar() { return foo() // this returns a promise }}
So in such a case, do I have to make the foobar()
controller method async?My understanding is that this is not necessary. NestJS will resolve the returned promise automatically. Making the method async is only needed if I wanna await
inside.
Is this correct?