fix(chat): 인물관계 삭제 후 수정 저장 시 서버 반영되지 않던 문제 수정
수정 모드에서 saveCharacter가 변경 필드만 전송하면서 relationships 배열이 제외되어 삭제/수정 사항이 서버에 반영되지 않는 문제가 있었습니다. 수정 시 항상 relationships를 포함해 서버와 동기화되도록 변경했습니다. - CharacterForm.vue: update 시 changedData.relationships 항상 포함
This commit is contained in:
		| @@ -1613,6 +1613,8 @@ export default { | |||||||
|         if (this.isEdit) { |         if (this.isEdit) { | ||||||
|           // 수정 시 변경된 필드만 전송 |           // 수정 시 변경된 필드만 전송 | ||||||
|           const changedData = this.getChangedFields(); |           const changedData = this.getChangedFields(); | ||||||
|  |           // 인물관계는 삭제를 포함해 항상 서버와 동기화를 보장하기 위해 항상 포함 | ||||||
|  |           changedData.relationships = this.character.relationships || []; | ||||||
|           response = await updateCharacter(changedData, this.character.image); |           response = await updateCharacter(changedData, this.character.image); | ||||||
|         } else { |         } else { | ||||||
|           // 신규 등록 시 ID 필드를 제외한 데이터 전송 |           // 신규 등록 시 ID 필드를 제외한 데이터 전송 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Yu Sung
					Yu Sung