git commit -m "fix(chat): 캐릭터 등록/수정 API
- 이름 중복 검사 로직 추가
This commit is contained in:
@@ -292,7 +292,10 @@ class ChatCharacterService(
|
||||
// isActive가 false이면 isActive = false, name = "inactive_$name"으로 변경하고 나머지는 반영하지 않는다.
|
||||
if (request.isActive != null && !request.isActive) {
|
||||
chatCharacter.isActive = false
|
||||
chatCharacter.name = "inactive_${chatCharacter.name}"
|
||||
|
||||
val inactiveName = "inactive_${request.name}"
|
||||
val randomSuffix = "_" + java.util.UUID.randomUUID().toString().replace("-", "")
|
||||
chatCharacter.name = inactiveName + randomSuffix
|
||||
|
||||
return saveChatCharacter(chatCharacter)
|
||||
}
|
||||
|
Reference in New Issue
Block a user