auth.controller.ts
898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import {
Controller,
Get,
Post,
Body,
Patch,
Param,
Delete,
} from '@nestjs/common';
import { AuthService } from './auth.service';
import { CreateAuthDto } from './dto/create-auth.dto';
import { UpdateAuthDto } from './dto/update-auth.dto';
@Controller('auth')
export class AuthController {
constructor(private readonly authService: AuthService) {}
@Post()
create(@Body() createAuthDto: CreateAuthDto) {
return this.authService.create(createAuthDto);
}
@Get()
findAll() {
return this.authService.findAll();
}
@Get(':id')
findOne(@Param('id') id: string) {
return this.authService.findOne(+id);
}
@Patch(':id')
update(@Param('id') id: string, @Body() updateAuthDto: UpdateAuthDto) {
return this.authService.update(+id, updateAuthDto);
}
@Delete(':id')
remove(@Param('id') id: string) {
return this.authService.remove(+id);
}
}