Spaces:
Sleeping
Sleeping
import { | |
Controller, | |
Get, | |
Post, | |
Body, | |
Patch, | |
Param, | |
Delete, | |
} from '@nestjs/common'; | |
import { UserService } from './user.service.js'; | |
import { CreateUserDto } from './dto/create-user.dto.js'; | |
'users') | (|
export class UserController { | |
constructor(private readonly userService: UserService) {} | |
() | |
async create() { () createUserDto: CreateUserDto | |
return this.userService.create(createUserDto); | |
} | |
() | |
async findAll() { | |
return this.userService.findAll(); | |
} | |
':id') | (|
async findOne('id') id: string) { ( | |
return this.userService.findOne(id); | |
} | |
':id') | (|
async remove('id') id: string) { ( | |
return this.userService.remove(+id); | |
} | |
} | |