aboutsummaryrefslogtreecommitdiff
path: root/src/server/updateProtos.ts
blob: c5552f6bf081b978fe5922585aba3e90d6938e1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { Database } from "./database";

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)))
    );

    console.log("done");
})();