aboutsummaryrefslogtreecommitdiff
path: root/src/server/updateProtos.ts
blob: 72a44ebf44b42e7ee7d5d9d8997ca73d777c88e0 (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');
})();