diff options
author | andrewdkim <adkim414@gmail.com> | 2019-07-19 11:21:47 -0400 |
---|---|---|
committer | andrewdkim <adkim414@gmail.com> | 2019-07-19 11:21:47 -0400 |
commit | e453e7010def252b6cc10ad49d64708767c5589b (patch) | |
tree | 4353a4be5495acd61d813066d001e2b12da7d207 /src/server/updateProtos.ts | |
parent | 9cad9abcf164c7d81b8debf4aa2639d83edd227b (diff) | |
parent | 8854d3277541a67aef4187b5d3592bea5a7fcfa2 (diff) |
merge from master
Diffstat (limited to 'src/server/updateProtos.ts')
-rw-r--r-- | src/server/updateProtos.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/server/updateProtos.ts b/src/server/updateProtos.ts new file mode 100644 index 000000000..90490eb45 --- /dev/null +++ b/src/server/updateProtos.ts @@ -0,0 +1,15 @@ +import { Database } from "./database"; + +const protos = + ["text", "histogram", "image", "web", "collection", "kvp", + "video", "audio", "pdf", "icon", "import", "linkdoc"]; + +(async function () { + await Promise.all( + protos.map(protoId => new Promise(res => Database.Instance.update(protoId, { + $set: { "fields.baseProto": true } + }, res))) + ); + + console.log("done"); +})();
\ No newline at end of file |