@digicms/cms
Version:
An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MySQL, MariaDB, PostgreSQL, SQLite
20 lines (14 loc) • 420 B
JavaScript
;
const { providerFactory } = require('@strapi/utils');
module.exports = (options = {}) => {
const provider = providerFactory(options);
return {
...provider,
async register(condition) {
if (strapi.isLoaded) {
throw new Error(`You can't register new conditions outside the bootstrap function.`);
}
return provider.register(condition.name, condition);
},
};
};