aboutsummaryrefslogtreecommitdiff
path: root/src/server/authentication/models/current_user_utils.ts
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-07-19 14:43:26 -0400
committerbob <bcz@cs.brown.edu>2019-07-19 14:43:26 -0400
commit89b2500e71e4d167c7ae179c3eb2b5052b128ad0 (patch)
tree8b243d52a47024b06d9941134d56c4e25f80d930 /src/server/authentication/models/current_user_utils.ts
parentae07ba8fb410752ea98702219247ce5f89d1758b (diff)
parent8854d3277541a67aef4187b5d3592bea5a7fcfa2 (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.ts5
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) {