주식 즉시 스크래핑 api 오류 수정
This commit is contained in:
10
src/api.js
10
src/api.js
@@ -58,12 +58,16 @@ export function deleteHistory(id) {
|
||||
return apiDelete(`/api/history/${id}`);
|
||||
}
|
||||
|
||||
export function getStockNews(limit = 20) {
|
||||
return apiGet(`/api/stock/news?limit=${limit}`);
|
||||
export function getStockNews(limit = 20, category) {
|
||||
const qs = new URLSearchParams({ limit: String(limit) });
|
||||
if (category) {
|
||||
qs.set("category", category);
|
||||
}
|
||||
return apiGet(`/api/stock/news?${qs.toString()}`);
|
||||
}
|
||||
|
||||
export function triggerStockScrap() {
|
||||
return apiPost("/api/admin/stock/scrap");
|
||||
return apiPost("/api/stock/scrap");
|
||||
}
|
||||
|
||||
export function getStockHealth() {
|
||||
|
||||
Reference in New Issue
Block a user