diff options
author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-07-17 20:48:14 -0400 |
---|---|---|
committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-07-17 20:48:14 -0400 |
commit | 5aa6bcdd4e23bb9e9d05181d0dc6b638e45e397b (patch) | |
tree | 1929cc92dd43d9e48d0e7dbe5649721ba9bba906 /src/server/authentication | |
parent | ea5b91c45baba7be50a5e2276f9b3618af634676 (diff) |
Moved DocServer.prepend and changed how corsProxy works
Diffstat (limited to 'src/server/authentication')
-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) { |