Merge branch 'releases/v4' into v4/middlewares

This commit is contained in:
Alexandre Bodin 2021-09-29 17:01:33 +02:00
commit e47f5cb5fc
2 changed files with 6 additions and 2 deletions

View File

@ -127,7 +127,11 @@ const createContentType = async ({ contentType, components = [] }, options = {})
*/ */
const generateAPI = ({ name, kind = 'collectionType' }) => { const generateAPI = ({ name, kind = 'collectionType' }) => {
const strapiGenerators = require('@strapi/generators'); const strapiGenerators = require('@strapi/generators');
return strapiGenerators.generate('api', { id: nameToSlug(name), kind }, { dir: strapi.dirs.src }); return strapiGenerators.generate(
'api',
{ id: nameToSlug(name), kind },
{ dir: strapi.dirs.root }
);
}; };
/** /**

View File

@ -4,4 +4,4 @@
* {{id}} service. * {{id}} service.
*/ */
module.exports = {}; module.exports = () => ({});