🐛 노트북 선택창 필드명 불일치 수정

- note-editor.html: notebook.name → notebook.title 수정
- notes.html: 모든 notebook.name → notebook.title 수정
- note-editor.js: 디버깅 로그 추가하여 노트북 데이터 구조 확인

백엔드 API에서는 'title' 필드를 사용하는데 프론트엔드에서 'name' 필드를 참조하여
노트북 선택창이 빈칸으로 표시되는 문제 해결
This commit is contained in:
Hyungi Ahn
2025-09-02 16:41:37 +09:00
parent 0dc4e3523f
commit ea9f4dfaa9
3 changed files with 11 additions and 3 deletions

View File

@@ -127,6 +127,14 @@ function noteEditorApp() {
// 임시: 직접 API 호출
this.availableNotebooks = await this.api.get('/notebooks/', { active_only: true });
console.log('📚 노트북 로드됨:', this.availableNotebooks.length, '개');
console.log('📚 노트북 데이터 상세:', this.availableNotebooks);
// 각 노트북의 필드 확인
if (this.availableNotebooks.length > 0) {
console.log('📚 첫 번째 노트북 필드:', Object.keys(this.availableNotebooks[0]));
console.log('📚 첫 번째 노트북 title:', this.availableNotebooks[0].title);
console.log('📚 첫 번째 노트북 name:', this.availableNotebooks[0].name);
}
} catch (error) {
console.error('노트북 로드 실패:', error);
this.availableNotebooks = [];