How to use the @webiny/api/entities.settingsFactory function in @webiny/api

To help you get started, we’ve selected a few @webiny/api examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github webiny / webiny-js / packages / api-page-builder / src / entities / PbSettings.entity.js View on Github external
export const pageBuilderSettingsFactory = (context: Object) => {
    return class PbSettings extends settingsFactory(context) {
        static key = "page-builder";
        static classId = "PbSettings";
        static collectionName = "Settings";

        data: Object;
        load: Function;

        constructor() {
            super();
            this.attr("data").model(createPbSettingsModel({ ...context, settings: this }));
        }
    };
};