🔨 refactor(API): add type to updateFlowInDatabase function and format code
The updateFlowInDatabase function now has a type added to it, which improves the readability of the code. The code has also been formatted to improve consistency with the rest of the codebase.
This commit is contained in:
parent
265646ded3
commit
cb7c8b45cd
1 changed files with 3 additions and 1 deletions
|
|
@ -111,7 +111,9 @@ export async function saveFlowToDatabase(newFlow: {
|
|||
* @returns {Promise<any>} 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<FlowType> {
|
||||
try {
|
||||
const response = await axios.patch(`/api/v1/flows/${updatedFlow.id}`, {
|
||||
name: updatedFlow.name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue