(recordId: string)
| 105 | } |
| 106 | |
| 107 | export async function checkHistoryExists(recordId: string): Promise<boolean> { |
| 108 | try { |
| 109 | const response = await axios.get( |
| 110 | `${API_BASE_URL}/history/${recordId}/exists`, |
| 111 | { |
| 112 | timeout: 5000 |
| 113 | } |
| 114 | ) |
| 115 | return response.data.exists === true |
| 116 | } catch (error: any) { |
| 117 | if (axios.isAxiosError(error)) { |
| 118 | return false |
| 119 | } |
| 120 | return false |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | export async function deleteHistory(recordId: string): Promise<{ |
| 125 | success: boolean |