sejongbinary / binary-backend

Binary Backend Repository
1 stars 0 forks source link

๋กœ๊ทธ์ธ - users.controller.ts #7

Open pgb0930 opened 2 months ago

pgb0930 commented 2 months ago

๐Ÿš… Issue ํ•œ ์ค„ ์š”์•ฝ

users.controller.ts

๐Ÿคท Issue ์„ธ๋ถ€ ๋‚ด์šฉ

import { Controller, Post, Body } from '@nestjs/common';
import { UsersService } from './users.service';

@Controller('users')
export class UsersController {
  constructor(private readonly usersService: UsersService) {}

  @Post('login')
  async register(
    @Body('username') username: string,
    @Body('password') password: string,
  ) {
    const user = await this.usersService.create(username, password);
    return user;
  }
}

โœจ ๊ธฐ๋Œ€ ๊ฒฐ๊ณผ

๐Ÿ“ธ ์Šคํฌ๋ฆฐ์ƒท