aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/server')
-rw-r--r--src/server/authentication/controllers/WorkspacesMenu.tsx3
-rw-r--r--src/server/database.ts2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/server/authentication/controllers/WorkspacesMenu.tsx b/src/server/authentication/controllers/WorkspacesMenu.tsx
index 29327e5ad..91756315d 100644
--- a/src/server/authentication/controllers/WorkspacesMenu.tsx
+++ b/src/server/authentication/controllers/WorkspacesMenu.tsx
@@ -3,8 +3,9 @@ import { observable, action, configure, reaction, computed, ObservableMap, runIn
import { observer } from "mobx-react";
import './WorkspacesMenu.css';
import { EditableView } from '../../../client/views/EditableView';
-import { Doc, Id } from '../../../new_fields/Doc';
+import { Doc } from '../../../new_fields/Doc';
import { StrCast } from '../../../new_fields/Types';
+import { Id } from '../../../new_fields/RefField';
export interface WorkspaceMenuProps {
active: Doc | undefined;
diff --git a/src/server/database.ts b/src/server/database.ts
index a61b4d823..6b3b6797f 100644
--- a/src/server/database.ts
+++ b/src/server/database.ts
@@ -60,11 +60,13 @@ export class Database {
}
public getDocument(id: string, fn: (result?: Transferable) => void, collectionName = Database.DocumentsCollection) {
+ console.log("getDocument");
this.db && this.db.collection(collectionName).findOne({ id: id }, (err, result) =>
fn(result ? ({ id: result._id, type: result.type, data: result.data }) : undefined));
}
public getDocuments(ids: string[], fn: (result: Transferable[]) => void, collectionName = Database.DocumentsCollection) {
+ console.log("getDocuments");
this.db && this.db.collection(collectionName).find({ id: { "$in": ids } }).toArray((err, docs) => {
if (err) {
console.log(err.message);