From fe991bd8105042093098302ff9b1c39af491a38e Mon Sep 17 00:00:00 2001 From: Steven Date: Mon, 19 Feb 2024 17:27:26 -0500 Subject: [PATCH] refactor(bandadaapi.ts): changed the function parameter of createAlert() to show the correct message --- apps/dashboard/src/api/bandadaAPI.ts | 30 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/apps/dashboard/src/api/bandadaAPI.ts b/apps/dashboard/src/api/bandadaAPI.ts index e9a511e1..b7bb8a47 100644 --- a/apps/dashboard/src/api/bandadaAPI.ts +++ b/apps/dashboard/src/api/bandadaAPI.ts @@ -93,7 +93,7 @@ export async function createGroup( name, description, treeDepth, - fingerprintDuration, + fingerprintDuration:null, credentials: JSON.stringify(credentials) } }) @@ -101,7 +101,7 @@ export async function createGroup( return { ...group, type: "off-chain" } } catch (error: any) { console.error(error) - createAlert(error) + createAlert(error.response.data) return null } } @@ -124,7 +124,7 @@ export async function updateGroup( return { ...group, type: "off-chain" } } catch (error: any) { console.error(error) - createAlert(error) + createAlert(error.response.data) return null } } @@ -140,7 +140,7 @@ export async function generateApiKey(groupId: string): Promise { }) } catch (error: any) { console.error(error) - createAlert(error) + createAlert(error.response.data) return null } } @@ -156,7 +156,7 @@ export async function removeGroup(groupId: string): Promise { }) } catch (error: any) { console.error(error) - createAlert(error) + createAlert(error.response.data) return null } } @@ -189,7 +189,7 @@ export async function setOAuthState( }) } catch (error: any) { console.error(error) - createAlert(error) + createAlert(error.response.data) return null } } @@ -213,7 +213,7 @@ export async function addMemberByCredentials( }) } catch (error: any) { console.error(error) - createAlert(error) + createAlert(error.response.data) return null } } @@ -233,7 +233,7 @@ export async function addMember( }) } catch (error: any) { console.error(error) - createAlert(error) + createAlert(error.response.data) return null } } @@ -259,7 +259,7 @@ export async function addMembers( }) } catch (error: any) { console.error(error) - createAlert(error) + createAlert(error.response.data) return null } } @@ -279,7 +279,7 @@ export async function removeMember( }) } catch (error: any) { console.error(error) - createAlert(error) + createAlert(error.response.data) return null } } @@ -305,7 +305,7 @@ export async function removeMembers( }) } catch (error: any) { console.error(error) - createAlert(error) + createAlert(error.response.data) return null } } @@ -321,7 +321,7 @@ export async function getNonce(): Promise { }) } catch (error: any) { console.error(error) - createAlert(error) + createAlert(error.response.data) return null } } @@ -349,7 +349,7 @@ export async function signIn({ }) } catch (error: any) { console.error(error) - createAlert(error) + createAlert(error.response.data) return null } } @@ -364,7 +364,7 @@ export async function logOut(): Promise { }) } catch (error: any) { console.error(error) - createAlert(error) + createAlert(error.response.data) return null } } @@ -380,7 +380,7 @@ export async function isLoggedIn(): Promise { }) } catch (error: any) { console.error(error) - createAlert(error) + createAlert(error.response.data) return null } }