swc/tests/fixture/issue-1362/case1/input/index.ts
강동윤 c765c7e06e
fix: Fix bugs (#1590)
swc_ecma_transforms_proposal:
 - Detect decorators in typescript parameter properties. (#1456)

swc:
 - Add tests for #1362. (#1362)
2021-04-19 10:16:10 +00:00

22 lines
545 B
TypeScript

import { Body, Controller, Get, Post } from '@nestjs/common';
import { AppService } from './app.service';
import { CreateUserDto } from './dtos/CreateUserDto';
@Controller()
export class AppController {
constructor(private readonly appService: AppService) { }
@Get()
async getHello() {
const result = await this.appService.getHello()
return result;
}
@Post()
async create(@Body() createUserDto: CreateUserDto) {
console.log("createUserDto", createUserDto)
return "Hello User!"
}
}