aboutsummaryrefslogtreecommitdiff
path: root/src/server/authentication/models/current_user_utils.ts
diff options
context:
space:
mode:
authorMohammad Amoush <muhammedamoush@gmail.com>2019-11-12 17:11:20 -0500
committerMohammad Amoush <muhammedamoush@gmail.com>2019-11-12 17:11:20 -0500
commit2ea0efa91072c98c185f957d8040edde2cdb4e5e (patch)
tree78576c68be7e1c157b0d293d6048a86652bf1ede /src/server/authentication/models/current_user_utils.ts
parent341a4201997a27adeace7cb3fad48ce83b8008a7 (diff)
parent63ea273820eb5ab8388e2744fc7988f10746f25f (diff)
added new managers to index
Diffstat (limited to 'src/server/authentication/models/current_user_utils.ts')
-rw-r--r--src/server/authentication/models/current_user_utils.ts7
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) {