diff options
author | bob <bcz@cs.brown.edu> | 2019-07-19 14:43:26 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-07-19 14:43:26 -0400 |
commit | 89b2500e71e4d167c7ae179c3eb2b5052b128ad0 (patch) | |
tree | 8b243d52a47024b06d9941134d56c4e25f80d930 /src/server/authentication/models/current_user_utils.ts | |
parent | ae07ba8fb410752ea98702219247ce5f89d1758b (diff) | |
parent | 8854d3277541a67aef4187b5d3592bea5a7fcfa2 (diff) |
Merge branch 'master' into stackingSections
Diffstat (limited to 'src/server/authentication/models/current_user_utils.ts')
-rw-r--r-- | src/server/authentication/models/current_user_utils.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/authentication/models/current_user_utils.ts b/src/server/authentication/models/current_user_utils.ts index e796ccb43..1c52a3f11 100644 --- a/src/server/authentication/models/current_user_utils.ts +++ b/src/server/authentication/models/current_user_utils.ts @@ -12,6 +12,7 @@ import { List } from "../../../new_fields/List"; import { listSpec } from "../../../new_fields/Schema"; import { Cast, FieldValue, StrCast } from "../../../new_fields/Types"; import { RouteStore } from "../../RouteStore"; +import { Utils } from "../../../Utils"; export class CurrentUserUtils { private static curr_email: string; @@ -74,7 +75,7 @@ export class CurrentUserUtils { } public static loadCurrentUser() { - return rp.get(DocServer.prepend(RouteStore.getCurrUser)).then(response => { + return rp.get(Utils.prepend(RouteStore.getCurrUser)).then(response => { if (response) { const result: { id: string, email: string } = JSON.parse(response); return result; @@ -87,7 +88,7 @@ export class CurrentUserUtils { public static async loadUserDocument({ id, email }: { id: string, email: string }) { this.curr_id = id; this.curr_email = email; - await rp.get(DocServer.prepend(RouteStore.getUserDocumentId)).then(id => { + await rp.get(Utils.prepend(RouteStore.getUserDocumentId)).then(id => { if (id) { return DocServer.GetRefField(id).then(async field => { if (field instanceof Doc) { |