From cb7c8b45cd40824baa27b463de57ffacb4a6cea0 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 15 Jun 2023 15:08:14 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20refactor(API):=20add=20type=20to?= =?UTF-8?q?=20updateFlowInDatabase=20function=20and=20format=20code=20The?= =?UTF-8?q?=20updateFlowInDatabase=20function=20now=20has=20a=20type=20add?= =?UTF-8?q?ed=20to=20it,=20which=20improves=20the=20readability=20of=20the?= =?UTF-8?q?=20code.=20The=20code=20has=20also=20been=20formatted=20to=20im?= =?UTF-8?q?prove=20consistency=20with=20the=20rest=20of=20the=20codebase.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/src/controllers/API/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/controllers/API/index.ts b/src/frontend/src/controllers/API/index.ts index b2d21bffd..f0c36a215 100644 --- a/src/frontend/src/controllers/API/index.ts +++ b/src/frontend/src/controllers/API/index.ts @@ -111,7 +111,9 @@ export async function saveFlowToDatabase(newFlow: { * @returns {Promise} The updated flow data. * @throws Will throw an error if the update fails. */ -export async function updateFlowInDatabase(updatedFlow: FlowType) { +export async function updateFlowInDatabase( + updatedFlow: FlowType +): Promise { try { const response = await axios.patch(`/api/v1/flows/${updatedFlow.id}`, { name: updatedFlow.name,