ticket-auth-project
Version:
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
28 lines (26 loc) • 637 B
text/typescript
import {
Body,
Controller,
Delete,
Param,
Post,
UseGuards,
} from '@nestjs/common';
import { UsersService } from './users.service';
import { JwtAuthGuard } from 'src/auth/jwt-auth.guard';
('users')
export class UsersController {
constructor(private readonly usersService: UsersService) {}
()
async createUser(
('username') username: string,
('password') password: string,
) {
return this.usersService.createUser(username, password);
}
(JwtAuthGuard)
(':id')
async deleteUser(('id') id: string) {
return this.usersService.deleteUser(id);
}
}