Created
September 19, 2021 13:00
-
-
Save rskhan167/b39459b364d89d2a7e0a90d15c98dc25 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Controller, Post, Body } from '@nestjs/common'; | |
import { CreateUserDto } from './dtos/create-user.dto'; | |
import { UserService } from './user.service'; | |
import { User } from './entities/user.entity'; | |
@Controller('user') | |
export class UserController { | |
constructor(private readonly userService: UserService) {} | |
@Post() | |
async create(@Body() createUserDto: CreateUserDto): Promise<User> { | |
return await this.userService.create(createUserDto); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment