Skip to content

Commit 944980e

Browse files
authored
Merge pull request #128 from ChooseTale/fix/create-game
feat: 새로운 페이지를 생성할 때 이름 짓기
2 parents c50467d + d5264f4 commit 944980e

File tree

7 files changed

+6
-8
lines changed

7 files changed

+6
-8
lines changed

src/common/chat-gpt/chatgpt.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export class ChatGPT implements IChatGPTPagePort {
9696
},
9797
],
9898
});
99-
console.log(promptGPT.choices[0].message.content);
99+
100100
if (promptGPT.choices[0].message.content === 'error') {
101101
return '';
102102
}
@@ -107,7 +107,7 @@ export class ChatGPT implements IChatGPTPagePort {
107107
n: 1,
108108
size: '1024x1024',
109109
});
110-
console.log(imageResponse.data[0].url);
110+
111111
const response = await axios.get(imageResponse.data[0].url ?? '', {
112112
responseType: 'stream',
113113
});

src/game-builder/choice/infrastructure/repositories/choice.repository.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ export class ChoiceRepository implements IChoiceRepository {
103103

104104
return toDomain(createdFromPage);
105105
} catch (err) {
106-
console.log(err);
107106
throw new BadRequestException(`선택지 생성 실패`);
108107
}
109108
}

src/game-builder/page/application/controllers/dto/update-page.dto.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export class UpdatePageReqDto {
2525

2626
@IsBoolean()
2727
@Transform(({ value }) => {
28-
console.log(value);
2928
return JSON.parse(value) == true;
3029
})
3130
isEnding: boolean;

src/game-builder/page/application/controllers/page.controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export class PageController {
136136
@Param('gameId', ParseIntPipe) gameId: number,
137137
@Body() body: CreatePageReqDto,
138138
): Promise<CreatePageResDto> {
139-
return await this.createPageUsecase.create(gameId, body);
139+
return await this.createPageUsecase.create(gameId);
140140
}
141141

142142
/**

src/game-builder/page/application/usecases/create-page.usecase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export class CreatePageUsecase {
88
@Inject('IPageService') private readonly pageService: IPageService,
99
) {}
1010

11-
public async create(gameId: number, body: CreatePageReqDto) {
11+
public async create(gameId: number) {
1212
const pages = await this.pageService.getAllByGameId(gameId);
1313
const isStarting = pages.length === 0;
1414

src/game-builder/page/application/usecases/get-page.usecase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class GetPageUseCase {
2424
}
2525

2626
const choices = await this.choiceService.getAllByFromPageId(pageId);
27-
console.log(getImagePathOrNull(page.backgroundImage?.url ?? undefined));
27+
2828
return {
2929
id: page.id,
3030
gameId: page.gameId,

src/game-builder/page/domain/entities/create-page.entity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export class CreatePageDomainEntity {
22
public createdAt: Date;
33
public updatedAt: Date;
44
public contents: [];
5-
public title: string = '';
5+
public title: string = '새 페이지';
66
public isEnding: boolean = false;
77
constructor(
88
public gameId: number,

0 commit comments

Comments
 (0)