mirror of
https://github.com/strapi/strapi.git
synced 2025-10-25 23:23:54 +00:00
Merge branch 'releases/v4' into v4/middlewares
This commit is contained in:
commit
e47f5cb5fc
@ -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 }
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -4,4 +4,4 @@
|
|||||||
* {{id}} service.
|
* {{id}} service.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = {};
|
module.exports = () => ({});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user