mirror of
https://github.com/openziti/zrok.git
synced 2024-11-22 08:03:49 +01:00
exercise the generated api (#781)
This commit is contained in:
parent
32f661c694
commit
6a535a1cd2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user