diff options
| author | Mohammad Amoush <mohammad_amoush@brown.edu> | 2019-07-22 13:57:10 -0400 |
|---|---|---|
| committer | Mohammad Amoush <mohammad_amoush@brown.edu> | 2019-07-22 13:57:10 -0400 |
| commit | 658ded478c273654174cd2706f8b3e021b8ceb95 (patch) | |
| tree | 7526f7850dd3702b9746125d2f4349a0d6aea8ee /src/server/updateProtos.ts | |
| parent | 157060f7e6029c76765aa20d8fdbe325401a3880 (diff) | |
| parent | 8db50c6ba0be83b85c896043da53e40c17523e90 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into youtube-api-muhammed
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 |
