(recordId: string)
| 71 | } |
| 72 | |
| 73 | export async function getHistory(recordId: string): Promise<{ |
| 74 | success: boolean |
| 75 | record?: HistoryDetail |
| 76 | error?: AppError | string |
| 77 | error_message?: string |
| 78 | }> { |
| 79 | try { |
| 80 | const response = await axios.get(`${API_BASE_URL}/history/${recordId}`, { |
| 81 | timeout: 10000 |
| 82 | }) |
| 83 | return response.data |
| 84 | } catch (error: any) { |
| 85 | return { success: false, ...getApiErrorPayload(error, '获取历史记录详情失败') } |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | export async function updateHistory( |
| 90 | recordId: string, |
no test coverage detected