diff options
author | bobzel <zzzman@gmail.com> | 2023-07-31 13:40:24 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-07-31 13:40:24 -0400 |
commit | 65d9b0eec138b99469d074a39c81ade6b972f4ab (patch) | |
tree | 4fb2f1b6efc43ff09bf35e00d6d874535e49a192 /src/client/util/CurrentUserUtils.ts | |
parent | 07899b00837c7d62aac3b021f977c3981e53068f (diff) |
added resolvedports to /getCurrentUser to avoid seperate request
Diffstat (limited to 'src/client/util/CurrentUserUtils.ts')
-rw-r--r-- | src/client/util/CurrentUserUtils.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index 8e91bf83f..cd4152bf9 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -916,9 +916,9 @@ export class CurrentUserUtils { public static async loadCurrentUser() { return rp.get(Utils.prepend("/getCurrentUser")).then(async response => { if (response) { - const result: { id: string, email: string, cacheDocumentIds: string } = JSON.parse(response); + const result: { id: string, email: string, cacheDocumentIds: string, ports: string } = JSON.parse(response); Doc.CurrentUserEmail = result.email; - resolvedPorts = JSON.parse(await (await fetch("/resolvedPorts")).text()); + resolvedPorts = result.ports as any; DocServer.init(window.location.protocol, window.location.hostname, resolvedPorts.socket, result.email); if (result.cacheDocumentIds) { |