mirror of
https://github.com/swc-project/swc.git
synced 2024-12-20 04:01:39 +03:00
c765c7e06e
swc_ecma_transforms_proposal: - Detect decorators in typescript parameter properties. (#1456) swc: - Add tests for #1362. (#1362)
22 lines
545 B
TypeScript
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!"
|
|
}
|
|
} |