Host switching
This commit is contained in:
@@ -6,6 +6,14 @@ export async function connect(secret, host='vista.northport.med.va.gov', port=19
|
||||
})).json();
|
||||
}
|
||||
|
||||
export async function close(cid) {
|
||||
return await (await fetch('/v1/vista/' + cid + '/close', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ id: Date.now() })
|
||||
})).json();
|
||||
}
|
||||
|
||||
export async function call(cid, method, ...params) {
|
||||
return await (await fetch('/v1/vista/' + cid, {
|
||||
method: 'POST',
|
||||
@@ -47,5 +55,5 @@ export async function authenticate(cid, avcode=null) {
|
||||
}
|
||||
|
||||
export default window.vista = {
|
||||
connect, call, callctx, serverinfo, userinfo, authenticate
|
||||
connect, close, call, callctx, serverinfo, userinfo, authenticate
|
||||
};
|
||||
|
Reference in New Issue
Block a user