aboutsummaryrefslogtreecommitdiff
path: root/src/server/updateProtos.ts
blob: 90490eb4586d7551dd8a69d80f8d19207c64c062 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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");
})();