fix(x-bot): 유튜브 일정에 채널명(source_name) 추가
- createScheduleFromYoutube에서 video.channelTitle을 source_name에 저장 - Meilisearch 동기화 시에도 source_name 포함
This commit is contained in:
parent
0ee587ad08
commit
8780384164
1 changed files with 11 additions and 4 deletions
|
|
@ -394,11 +394,18 @@ async function createScheduleFromYoutube(video) {
|
|||
const date = formatDate(kstDate);
|
||||
const time = formatTime(kstDate);
|
||||
|
||||
// 일정 생성
|
||||
// 일정 생성 (source_name에 채널명 저장)
|
||||
const [result] = await pool.query(
|
||||
`INSERT INTO schedules (title, date, time, category_id, source_url, source_name)
|
||||
VALUES (?, ?, ?, ?, ?, NULL)`,
|
||||
[video.title, date, time, YOUTUBE_CATEGORY_ID, video.videoUrl]
|
||||
VALUES (?, ?, ?, ?, ?, ?)`,
|
||||
[
|
||||
video.title,
|
||||
date,
|
||||
time,
|
||||
YOUTUBE_CATEGORY_ID,
|
||||
video.videoUrl,
|
||||
video.channelTitle || null,
|
||||
]
|
||||
);
|
||||
|
||||
const scheduleId = result.insertId;
|
||||
|
|
@ -418,7 +425,7 @@ async function createScheduleFromYoutube(video) {
|
|||
category_id: YOUTUBE_CATEGORY_ID,
|
||||
category_name: categoryInfo[0]?.name || "",
|
||||
category_color: categoryInfo[0]?.color || "",
|
||||
source_name: null,
|
||||
source_name: video.channelTitle || null,
|
||||
source_url: video.videoUrl,
|
||||
members: [],
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue