()
| 157 | } |
| 158 | |
| 159 | export async function getHistoryStats(): Promise<{ |
| 160 | success: boolean |
| 161 | total: number |
| 162 | by_status: Record<string, number> |
| 163 | error?: AppError | string |
| 164 | error_message?: string |
| 165 | }> { |
| 166 | try { |
| 167 | const response = await axios.get(`${API_BASE_URL}/history/stats`, { |
| 168 | timeout: 10000 |
| 169 | }) |
| 170 | return response.data |
| 171 | } catch (error: any) { |
| 172 | return { success: false, total: 0, by_status: {}, ...getApiErrorPayload(error, '获取统计信息失败') } |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | export async function scanAllTasks(): Promise<{ |
| 177 | success: boolean |
nothing calls this directly
no test coverage detected