Skip to content

Commit

Permalink
fix: 修复异步函数调用缺失await关键字问题 (#696)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaojin3616 committed Jun 27, 2024
2 parents 7957ec3 + 4df14a9 commit f6d557a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/frontend/src/controllers/API/flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export function getReportFormApi(flow_id): Promise<any> {
* @throws Will throw an error if fetching fails.
*/
export async function getFlowApi(flowId: string): Promise<FlowType> {
return axios.get(`/api/v1/flows/${flowId}`)
return await axios.get(`/api/v1/flows/${flowId}`)
}

/**
Expand Down Expand Up @@ -197,7 +197,7 @@ export const createCustomFlowApi = async (params: {
export async function updateFlowApi(
updatedFlow: FlowType
): Promise<FlowType> {
return axios.patch(`/api/v1/flows/${updatedFlow.id}`, {
return await axios.patch(`/api/v1/flows/${updatedFlow.id}`, {
name: updatedFlow.name,
data: updatedFlow.data,
description: updatedFlow.description,
Expand Down

0 comments on commit f6d557a

Please sign in to comment.