aboutsummaryrefslogtreecommitdiff
path: root/src/server/updateProtos.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-05-14 12:03:40 -0400
committerbobzel <zzzman@gmail.com>2023-05-14 12:03:40 -0400
commit42afc0250de658fc3e924864bfae5afb4edec335 (patch)
treed61bbc43d95cb6e1d6fa5c997102d505adc09af5 /src/server/updateProtos.ts
parent0849fbd97c61688d51e5fea6cf8edc47989df5de (diff)
major overhaul of field naming conventions.
Diffstat (limited to 'src/server/updateProtos.ts')
-rw-r--r--src/server/updateProtos.ts24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/server/updateProtos.ts b/src/server/updateProtos.ts
index c5552f6bf..2f3772a77 100644
--- a/src/server/updateProtos.ts
+++ b/src/server/updateProtos.ts
@@ -1,14 +1,22 @@
-import { Database } from "./database";
+import { Database } from './database';
-const protos =
- ["text", "image", "web", "collection", "kvp", "video", "audio", "pdf", "icon", "import", "linkdoc", "map"];
+const protos = ['text', 'image', 'web', 'collection', 'kvp', 'video', 'audio', 'pdf', 'icon', 'import', 'linkdoc', 'map'];
(async function () {
await Promise.all(
- protos.map(protoId => new Promise(res => Database.Instance.update(protoId, {
- $set: { "fields.baseProto": true }
- }, res)))
+ protos.map(
+ protoId =>
+ new Promise(res =>
+ Database.Instance.update(
+ protoId,
+ {
+ $set: { 'fields.isBaseProto': true },
+ },
+ res
+ )
+ )
+ )
);
- console.log("done");
-})(); \ No newline at end of file
+ console.log('done');
+})();