diff options
author | bobzel <zzzman@gmail.com> | 2023-06-14 09:12:13 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-06-14 09:12:13 -0400 |
commit | 376270791c7fe414c05a87f73afe11146d119c35 (patch) | |
tree | c6c788c958a5aaca4a9bbdd709d5e6f1d76dde0d /src/server/updateProtos.ts | |
parent | 2bc89733ce522527c2f27203b537d99395c9479b (diff) | |
parent | bf16eca7a84adfdf1c5970e7e4793568ee70325d (diff) |
Merge branch 'master' into advanced-trails
Diffstat (limited to 'src/server/updateProtos.ts')
-rw-r--r-- | src/server/updateProtos.ts | 24 |
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'); +})(); |