Skip to content

Commit

Permalink
fix: 임시저장 업데이트 시 메인, 서브태그 값 업데이트
Browse files Browse the repository at this point in the history
  • Loading branch information
jschoi-96 committed Nov 28, 2024
1 parent 71a5b65 commit 6143b67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void createTempGame(CreateTempGameSetRequest request, ApiMember apiMember

if (member.hasTempGameSet()) { // 기존 임시저장이 존재하는 경우
TempGameSet existGame = member.getTempGameSet();
existGame.updateTempGameSet(request.getTitle(), newTempGames);
existGame.updateTempGameSet(request.getTitle(), request.getSubTag(), mainTag, newTempGames);
processTempGameFiles(tempGames, existGame.getTempGames());
return;
}
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/balancetalk/game/domain/TempGameSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ public void addGames(List<TempGame> tempGames) {
});
}

public void updateTempGameSet(String title, List<TempGame> newTempGames) {
public void updateTempGameSet(String title, String subTag, MainTag mainTag, List<TempGame> newTempGames) {
this.title = title;
this.subTag = subTag;
this.mainTag = mainTag;
IntStream.range(0, this.tempGames.size()).forEach(i -> {
TempGame existingGame = this.tempGames.get(i);
TempGame newGame = newTempGames.get(i);
Expand Down

0 comments on commit 6143b67

Please sign in to comment.