Skip to content

Commit

Permalink
docs/#41/dto명 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
JeonHeena committed Jan 24, 2025
1 parent 2cc1464 commit 2e48ad9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/users/controllers/user-items.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
HttpCode,
} from '@nestjs/common';
import { UserItemsService } from '../services/user-items.service';
import { BuyItemDto } from '../dtos/buy-item.dto';
import { CreateItemDto } from '../dtos/create-item.dto';
import { EquipItemDto } from '../dtos/equip-item.dto';
import { ApiTags } from '@nestjs/swagger';
import { PositiveIntPipe } from 'src/common/pipes/positive-int/positive-int.pipe';
Expand All @@ -33,10 +33,10 @@ export class UserItemsController {
@HttpCode(201)
async buyItem(
@Param('userId', PositiveIntPipe) userId: number,
@Body() buyItemDto: BuyItemDto,
@Body() createItemDto: CreateItemDto,
) {
buyItemDto.userId = userId;
return await this.userItemsService.buyItem(buyItemDto);
createItemDto.userId = userId;
return await this.userItemsService.buyItem(createItemDto);
}

@Patch()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IsArray, IsInt } from 'class-validator';
export class BuyItemDto {
export class CreateItemDto {
@IsInt()
userId: number;

Expand Down

0 comments on commit 2e48ad9

Please sign in to comment.