aboutsummaryrefslogtreecommitdiff
path: root/src/server/updateProtos.ts
blob: 2f3772a7716f4ce6c475c5858ae57df4519e5ba1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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.isBaseProto': true },
                        },
                        res
                    )
                )
        )
    );

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