aboutsummaryrefslogtreecommitdiff
path: root/src/client/DocServer.ts
diff options
context:
space:
mode:
authorgeireann <geireann.lindfield@gmail.com>2022-12-21 02:06:32 -0500
committergeireann <geireann.lindfield@gmail.com>2022-12-21 02:06:32 -0500
commit24f9d90c2b465e8a87226ebcf5c9cfdcf7c9701c (patch)
treee0a0406126ff32b7f80e74e223eded607126df9b /src/client/DocServer.ts
parent61683e5e084f0b3a6c53bde08295a25b53ea2db3 (diff)
server side updates
Diffstat (limited to 'src/client/DocServer.ts')
-rw-r--r--src/client/DocServer.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/client/DocServer.ts b/src/client/DocServer.ts
index 0da4dc08d..ad39529df 100644
--- a/src/client/DocServer.ts
+++ b/src/client/DocServer.ts
@@ -38,9 +38,15 @@ export namespace DocServer {
});
strings.sort().forEach((str, i) => console.log(i.toString() + ' ' + str));
}
+ const filtered = Array.from(Object.keys(_cache)).filter(key => {
+ const doc = _cache[key] as Doc;
+ if (!(StrCast(doc.author).includes(".edu")||StrCast(doc.author).includes(".com")) || doc.author == Doc.CurrentUserEmail) return true;
+ return false;
+ });
+
rp.post(Utils.prepend('/setCacheDocumentIds'), {
body: {
- cacheDocumentIds: Array.from(Object.keys(_cache)).join(';'),
+ cacheDocumentIds: filtered.join(';'),
},
json: true,
});