캐릭터 챗봇 #74
| @@ -922,19 +922,21 @@ export default { | |||||||
|         image: null, |         image: null, | ||||||
|         imageUrl: '', |         imageUrl: '', | ||||||
|         isActive: true, |         isActive: true, | ||||||
|         createdAt: '', |  | ||||||
|         gender: '', |         gender: '', | ||||||
|         age: '', |         age: '', | ||||||
|         mbti: '', |         mbti: '', | ||||||
|         worldView: '', |  | ||||||
|         relationships: '', |  | ||||||
|         personality: '', |  | ||||||
|         speechPattern: '', |         speechPattern: '', | ||||||
|         conversationStyle: '', |         conversationStyle: '', | ||||||
|         appearance: '', |         appearance: '', | ||||||
|         systemPrompt: '', |         systemPrompt: '', | ||||||
|         tags: [], |         tags: [], | ||||||
|         memories: [] |         memories: [], | ||||||
|  |         relationships: [], | ||||||
|  |         hobbies: [], | ||||||
|  |         values: [], | ||||||
|  |         goals: [], | ||||||
|  |         personalities: [], | ||||||
|  |         backgrounds: [] | ||||||
|       }, |       }, | ||||||
|       ageRules: [ |       ageRules: [ | ||||||
|         v => !!v || '나이를 입력하세요', |         v => !!v || '나이를 입력하세요', | ||||||
| @@ -1331,7 +1333,7 @@ export default { | |||||||
|         const response = await getCharacter(id); |         const response = await getCharacter(id); | ||||||
|  |  | ||||||
|         // API 응답에서 캐릭터 정보 설정 |         // API 응답에서 캐릭터 정보 설정 | ||||||
|         if (response && response.data) { |         if (response && response.success === true && response.data) { | ||||||
|           const data = response.data; |           const data = response.data; | ||||||
|  |  | ||||||
|           // 원본 데이터 저장 (깊은 복사) |           // 원본 데이터 저장 (깊은 복사) | ||||||
| @@ -1390,7 +1392,6 @@ export default { | |||||||
|         if (this.isEdit) { |         if (this.isEdit) { | ||||||
|           // 수정 시 변경된 필드만 전송 |           // 수정 시 변경된 필드만 전송 | ||||||
|           const changedData = this.getChangedFields(); |           const changedData = this.getChangedFields(); | ||||||
|           console.log('변경된 필드만 전송:', changedData); |  | ||||||
|           response = await updateCharacter(changedData, this.character.image); |           response = await updateCharacter(changedData, this.character.image); | ||||||
|         } else { |         } else { | ||||||
|           // 신규 등록 시 ID 필드를 제외한 데이터 전송 |           // 신규 등록 시 ID 필드를 제외한 데이터 전송 | ||||||
| @@ -1399,7 +1400,7 @@ export default { | |||||||
|           response = await createCharacter(characterWithoutId); |           response = await createCharacter(characterWithoutId); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         if (response && response.data) { |         if (response && response.success === true && response.data) { | ||||||
|           this.notifySuccess(this.isEdit ? '캐릭터가 수정되었습니다.' : '캐릭터가 등록되었습니다.'); |           this.notifySuccess(this.isEdit ? '캐릭터가 수정되었습니다.' : '캐릭터가 등록되었습니다.'); | ||||||
|           this.goBack(); |           this.goBack(); | ||||||
|         } else { |         } else { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user