diff --git a/back/src/modules/message/dto/response/res-create-message.dto.ts b/back/src/modules/message/dto/response/res-create-message.dto.ts index e209c4b..ebf3099 100644 --- a/back/src/modules/message/dto/response/res-create-message.dto.ts +++ b/back/src/modules/message/dto/response/res-create-message.dto.ts @@ -10,6 +10,13 @@ import { ApiProperty } from '@nestjs/swagger'; import { Expose } from 'class-transformer'; export class ResCreateMessageDto { + @Expose() + @IsNotEmpty() + @IsNumber() + @Min(1) + @ApiProperty({ type: Number, description: '메세지 id' }) + readonly id: number; + @Expose() @IsString() @Length(1, 16) diff --git a/back/src/modules/message/message.service.ts b/back/src/modules/message/message.service.ts index 24a7ba2..27c02b5 100644 --- a/back/src/modules/message/message.service.ts +++ b/back/src/modules/message/message.service.ts @@ -56,14 +56,7 @@ export class MessageService { ...createMessageDto }); try { - const resCreateMessage = await this.messageRepository.save( - messageEntity, - { - transaction: false, - reload: false - } - ); - console.log(resCreateMessage); + const resCreateMessage = await this.messageRepository.save(messageEntity); return plainToInstance(ResCreateMessageDto, resCreateMessage, { excludeExtraneousValues: true }); diff --git a/back/src/modules/snowball/snowball.service.ts b/back/src/modules/snowball/snowball.service.ts index ac8deb8..09dc896 100644 --- a/back/src/modules/snowball/snowball.service.ts +++ b/back/src/modules/snowball/snowball.service.ts @@ -49,10 +49,7 @@ export class SnowballService { ...createSnowballDto }); - const savedSnowballEntity = await this.snowballRepository.save(snowball, { - reload: false, - transaction: false - }); + const savedSnowballEntity = await this.snowballRepository.save(snowball); const savedSnowball = instanceToPlain(savedSnowballEntity); const combinedSnowballDto = {