diff --git a/backend/src/app.js b/backend/src/app.js index ce72c1a..c297139 100644 --- a/backend/src/app.js +++ b/backend/src/app.js @@ -122,13 +122,22 @@ export async function buildApp(opts = {}) { return { status: 'ok', timestamp: nowKST() }; }); - // 봇 상태 조회 엔드포인트 + // 봇 상태 조회 엔드포인트 (공개) + // 민감한 설정(채널/계정/필터)·에러 내부정보는 제외하고 상태 요약만 노출. + // 관리자 화면은 인증된 /api/admin/bots를 사용한다. fastify.get('/api/bots', async () => { - const bots = fastify.scheduler.getBots(); + const bots = await fastify.scheduler.getBots(); const statuses = await Promise.all( bots.map(async bot => { const status = await fastify.scheduler.getStatus(bot.id); - return { ...bot, ...status }; + return { + id: bot.id, + type: bot.type, + enabled: bot.enabled, + status: status.status, + lastCheckAt: status.lastCheckAt, + lastAddedCount: status.lastAddedCount, + }; }) ); return statuses;