(params: Record<string, any>)
| 442 | setModelLimit(value.limit) |
| 443 | } |
| 444 | const fetchActionsList = async (params: Record<string, any>) => { |
| 445 | try { |
| 446 | const res: any = await getActionsList(params) |
| 447 | const data = res.data.map((item: any) => { |
| 448 | return { |
| 449 | ...item, |
| 450 | key: item.action_id, |
| 451 | method: getFirstMethodAndEndpoint(item.openapi_schema)?.method, |
| 452 | endpoint: getFirstMethodAndEndpoint(item.openapi_schema)?.endpoint |
| 453 | } |
| 454 | }) |
| 455 | |
| 456 | setActionList(data) |
| 457 | setHasActionMore(res.has_more) |
| 458 | } catch (error) { |
| 459 | console.log(error) |
| 460 | const apiResponse = error as ApiErrorResponse |
| 461 | const message = apiResponse.response.data.error.message |
| 462 | toast.error(message) |
| 463 | } |
| 464 | } |
| 465 | const fetchModelsList = async (params: Record<string, any>) => { |
| 466 | |
| 467 | try { |
no test coverage detected