exercise the generated api (#781)

This commit is contained in:
Michael Quigley 2024-11-18 14:20:23 -05:00
parent 32f661c694
commit 6a535a1cd2
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62

View File

@ -21,7 +21,13 @@ function App() {
useEffect(() => { useEffect(() => {
let api = new AgentApi(new Configuration({basePath: window.location.origin})); 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 => { console.log(e.response.json().then(eb => {
setErrorMessage(eb.message); setErrorMessage(eb.message);
console.log(eb.message); console.log(eb.message);