Skip to content

Commit

Permalink
exercise the generated api (#781)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelquigley committed Nov 18, 2024
1 parent 32f661c commit 6a535a1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion agent/agentUiTs/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6a535a1

Please sign in to comment.