mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 21:50:34 +03:00
fixes
Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com>
This commit is contained in:
parent
437170c203
commit
c7ca07134a
@ -27,14 +27,14 @@ export { connect }
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
||||
export default async () => {
|
||||
let _token: string | undefined = undefined
|
||||
let _token: string | undefined
|
||||
let client: Client | undefined
|
||||
|
||||
return {
|
||||
function: {
|
||||
GetClient: async (token: string, endpoint: string): Promise<Client> => {
|
||||
if (token !== _token && client !== undefined) {
|
||||
client.close()
|
||||
await client.close()
|
||||
client = undefined
|
||||
}
|
||||
if (client === undefined) {
|
||||
|
Loading…
Reference in New Issue
Block a user