diff options
author | yipstanley <stanley_yip@brown.edu> | 2019-07-16 19:10:22 -0400 |
---|---|---|
committer | yipstanley <stanley_yip@brown.edu> | 2019-07-16 19:10:22 -0400 |
commit | 99f6dfa4c12ceb9bf426a3882867ccb5a99bf071 (patch) | |
tree | df69b368e43ab10e0ec85a2b90c34fa07dd41494 /src/server/updateProtos.ts | |
parent | 894b829db4c2f5e4b14428d933259595904dda7b (diff) | |
parent | 430fd8c0a3dcaf92f599bf6c8b8032db8774bae7 (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
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 |