diff options
| author | srichman333 <sarah_n_richman@brown.edu> | 2023-06-14 17:23:23 -0400 |
|---|---|---|
| committer | srichman333 <sarah_n_richman@brown.edu> | 2023-06-14 17:23:23 -0400 |
| commit | f0474c18d092f4db49255a1e92d7f052b7398897 (patch) | |
| tree | 1e26ccaf42dec4d99904e2eddb36dff6f3b55948 /src/server/updateProtos.ts | |
| parent | 20d217d825891cf29a432a048d1f8e7bc04d062a (diff) | |
| parent | bf1198fbe73847087b1ec8e00a43306816b3508a (diff) | |
Merge branch 'master' into collaboration-sarah
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'); +})(); |
