MCPcopy
hub / github.com/HisMax/RedInk / searchHistory

Function searchHistory

frontend/src/api/history.ts:142–157  ·  view source on GitHub ↗
(keyword: string)

Source from the content-addressed store, hash-verified

140}
141
142export async function searchHistory(keyword: string): Promise<{
143 success: boolean
144 records: HistoryRecord[]
145 error?: AppError | string
146 error_message?: string
147}> {
148 try {
149 const response = await axios.get(`${API_BASE_URL}/history/search`, {
150 params: { keyword },
151 timeout: 10000
152 })
153 return response.data
154 } catch (error: any) {
155 return { success: false, records: [], ...getApiErrorPayload(error, '搜索历史记录失败') }
156 }
157}
158
159export async function getHistoryStats(): Promise<{
160 success: boolean

Callers

nothing calls this directly

Calls 2

getApiErrorPayloadFunction · 0.90
getMethod · 0.80

Tested by

no test coverage detected