fix(x-bot): 동기화 결과에 total 필드 추가

- syncNewTweets(), syncAllTweets()에 total 필드 추가
- 프론트엔드 토스트에서 undefined 표시되던 문제 해결

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
caadiq 2026-02-08 09:57:04 +09:00
parent c86cda00ae
commit 7d140aa1f3

View file

@ -191,7 +191,7 @@ async function xBotPlugin(fastify, opts) {
}
}
return { addedCount: addedCount + ytAddedCount, tweetCount: addedCount, ytCount: ytAddedCount };
return { addedCount: addedCount + ytAddedCount, total: tweets.length, tweetCount: addedCount, ytCount: ytAddedCount };
}
/**
@ -219,7 +219,7 @@ async function xBotPlugin(fastify, opts) {
}
}
return { addedCount: addedCount + ytAddedCount, tweetCount: addedCount, ytCount: ytAddedCount };
return { addedCount: addedCount + ytAddedCount, total: tweets.length, tweetCount: addedCount, ytCount: ytAddedCount };
}
/**