lotto 기능 고도화

This commit is contained in:
2026-03-20 01:55:53 +09:00
parent 248835fa54
commit 46e122a229
6 changed files with 2926 additions and 1690 deletions

View File

@@ -246,6 +246,62 @@ export function deleteSellHistory(id) {
return apiDelete(`/api/portfolio/sell-history/${id}`);
}
// ── 로또 고도화 API ────────────────────────────────────────────────────────────
// GET /api/lotto/stats/performance
export function getPerformanceStats() {
return apiGet('/api/lotto/stats/performance');
}
// GET /api/lotto/report/latest
export function getLatestReport() {
return apiGet('/api/lotto/report/latest');
}
// GET /api/lotto/report/:drw_no
export function getReport(drwNo) {
return apiGet(`/api/lotto/report/${drwNo}`);
}
// GET /api/lotto/report/history?limit=N
export function getReportHistory(limit = 10) {
return apiGet(`/api/lotto/report/history?limit=${limit}`);
}
// GET /api/lotto/analysis/personal
export function getPersonalAnalysis() {
return apiGet('/api/lotto/analysis/personal');
}
// GET /api/lotto/purchase?draw_no=N&days=N
export function getPurchases({ draw_no, days } = {}) {
const qs = new URLSearchParams();
if (draw_no) qs.set('draw_no', String(draw_no));
if (days) qs.set('days', String(days));
const q = qs.toString();
return apiGet(`/api/lotto/purchase${q ? '?' + q : ''}`);
}
// GET /api/lotto/purchase/stats
export function getPurchaseStats() {
return apiGet('/api/lotto/purchase/stats');
}
// POST /api/lotto/purchase
export function addPurchase(data) {
return apiPost('/api/lotto/purchase', data);
}
// PUT /api/lotto/purchase/:id
export function updatePurchase(id, data) {
return apiPut(`/api/lotto/purchase/${id}`, data);
}
// DELETE /api/lotto/purchase/:id
export function deletePurchase(id) {
return apiDelete(`/api/lotto/purchase/${id}`);
}
// ── 블로그 API ────────────────────────────────────────────────────────────────
// GET /api/blog/posts → { posts: [{id, title, tags, body, date, excerpt}] }
// POST /api/blog/posts → 새 글 생성