From 6a535a1cd2ce86b2dce71bbda964efb894c01a19 Mon Sep 17 00:00:00 2001 From: Michael Quigley Date: Mon, 18 Nov 2024 14:20:23 -0500 Subject: [PATCH] exercise the generated api (#781) --- agent/agentUiTs/src/App.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/agent/agentUiTs/src/App.tsx b/agent/agentUiTs/src/App.tsx index 76feb5d7..b332de43 100644 --- a/agent/agentUiTs/src/App.tsx +++ b/agent/agentUiTs/src/App.tsx @@ -21,7 +21,13 @@ function App() { useEffect(() => { let api = new AgentApi(new Configuration({basePath: window.location.origin})); - api.agentAccessPrivate({token: "a", bindAddress: "127.0.0.1:9911"}).catch(e => { + api.agentAccessPrivate({token: "testing", bindAddress: "127.0.0.1:9911"}).then(v => { + if(v.frontendToken) { + setErrorMessage(v.frontendToken); + } else { + console.log(v); + } + }).catch(e => { console.log(e.response.json().then(eb => { setErrorMessage(eb.message); console.log(eb.message);