feat(admin): 봇 목록 API에 X 봇 상세 정보 추가

- 스키마에 X 봇 필드 추가 (username, display_name, avatar_url)
- X 봇 응답에 db_id, cron_interval 포함

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
caadiq 2026-02-07 23:56:45 +09:00
parent 25c2b45cf5
commit 86769f1edc

View file

@ -29,6 +29,10 @@ const botResponse = {
default_member_ids: { type: 'array', items: { type: 'integer' } },
extract_members_from_desc: { type: 'boolean' },
auto_schedule_config: { type: ['object', 'null'], additionalProperties: true },
// X 봇 전용 필드
username: { type: 'string' },
display_name: { type: 'string' },
avatar_url: { type: 'string' },
},
};
@ -112,6 +116,15 @@ export default async function botsRoutes(fastify) {
botData.auto_schedule_config = bot.autoScheduleNext || null;
}
// X 봇인 경우 상세 정보 추가
if (bot.type === 'x') {
botData.db_id = bot.dbId;
botData.username = bot.username;
botData.display_name = bot.displayName;
botData.avatar_url = bot.avatarUrl;
botData.cron_interval = checkInterval;
}
result.push(botData);
}