feat(dashboard): Migrate to new hooks and API client (#6963)
This commit is contained in:
committed by
GitHub
parent
5ba74ec5fc
commit
8a5c6928f7
@@ -0,0 +1,27 @@
|
||||
import {
|
||||
WorkflowExecutionListRes,
|
||||
WorkflowExecutionRes,
|
||||
} from "../../types/api-responses"
|
||||
import { getRequest } from "./common"
|
||||
|
||||
async function retrieveWorkflowExecution(
|
||||
id: string,
|
||||
query?: Record<string, any>
|
||||
) {
|
||||
return getRequest<WorkflowExecutionRes>(
|
||||
`/admin/workflows-executions/${id}`,
|
||||
query
|
||||
)
|
||||
}
|
||||
|
||||
async function listWorkflowExecutions(query?: Record<string, any>) {
|
||||
return getRequest<WorkflowExecutionListRes>(
|
||||
`/admin/workflows-executions`,
|
||||
query
|
||||
)
|
||||
}
|
||||
|
||||
export const workflowExecutions = {
|
||||
retrieve: retrieveWorkflowExecution,
|
||||
list: listWorkflowExecutions,
|
||||
}
|
||||
Reference in New Issue
Block a user