diff options
author | Sam Wilkins <samwilkins333@gmail.com> | 2019-11-10 14:56:58 -0500 |
---|---|---|
committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-11-10 14:56:58 -0500 |
commit | 36ad83493d2bd58dc6fe62df6002789ccc1b06a1 (patch) | |
tree | c0d49bd48b8b26f7d46345bf2397dd5ba69c1884 /src/server/authentication/models/current_user_utils.ts | |
parent | ed0657b6b0ca1566af06038e418feda8a680419d (diff) |
no more RouteStore
Diffstat (limited to 'src/server/authentication/models/current_user_utils.ts')
-rw-r--r-- | src/server/authentication/models/current_user_utils.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/server/authentication/models/current_user_utils.ts b/src/server/authentication/models/current_user_utils.ts index 73cac879e..5a8815983 100644 --- a/src/server/authentication/models/current_user_utils.ts +++ b/src/server/authentication/models/current_user_utils.ts @@ -11,7 +11,6 @@ import { List } from "../../../new_fields/List"; import { listSpec } from "../../../new_fields/Schema"; import { Cast, StrCast, PromiseValue } from "../../../new_fields/Types"; import { Utils } from "../../../Utils"; -import { RouteStore } from "../../RouteStore"; import { ScriptField } from "../../../new_fields/ScriptField"; import { ButtonBox } from "../../../client/views/nodes/ButtonBox"; import { UndoManager } from "../../../client/util/UndoManager"; @@ -198,8 +197,8 @@ export class CurrentUserUtils { return doc; } - public static loadCurrentUser() { - return rp.get(Utils.prepend(RouteStore.getCurrUser)).then(response => { + public static async loadCurrentUser() { + return rp.get(Utils.prepend("/getCurrentUser")).then(response => { if (response) { const result: { id: string, email: string } = JSON.parse(response); return result; @@ -212,7 +211,7 @@ export class CurrentUserUtils { public static async loadUserDocument({ id, email }: { id: string, email: string }) { this.curr_id = id; Doc.CurrentUserEmail = email; - await rp.get(Utils.prepend(RouteStore.getUserDocumentId)).then(id => { + await rp.get(Utils.prepend("/getUserDocumentId")).then(id => { if (id && id !== "guest") { return DocServer.GetRefField(id).then(async field => { if (field instanceof Doc) { |