mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 15:13:21 +00:00
Remove deprecated templates
This commit is contained in:
parent
b11ae67e01
commit
95d7b61057
@ -69,15 +69,6 @@ module.exports = function (strapi) {
|
||||
});
|
||||
},
|
||||
|
||||
// Load API templates from `./api/*/templates/**/*.template.json`.
|
||||
'templates/**': function (cb) {
|
||||
dictionary.aggregate({
|
||||
dirname: path.resolve(strapi.config.appPath, strapi.config.paths.api, api, strapi.config.paths.templates),
|
||||
filter: /(.+)\.(template.json)$/,
|
||||
depth: 2
|
||||
}, cb);
|
||||
},
|
||||
|
||||
// Load API services from `./api/*/services/*.js`.
|
||||
'services/*': function (cb) {
|
||||
dictionary.optional({
|
||||
@ -136,10 +127,7 @@ module.exports = function (strapi) {
|
||||
models: api['models/*'],
|
||||
services: api['services/*'],
|
||||
policies: api['policies/*'],
|
||||
config: api['config/**'],
|
||||
templates: _.reduce(api['templates/**'], function (result, attributes) {
|
||||
return _.merge(result, attributes);
|
||||
}) || {}
|
||||
config: api['config/**']
|
||||
};
|
||||
|
||||
// Delete the definition if it's empty.
|
||||
|
||||
@ -333,8 +333,7 @@ module.exports = function (strapi) {
|
||||
});
|
||||
|
||||
return api;
|
||||
}),
|
||||
templates: {}
|
||||
})
|
||||
};
|
||||
|
||||
cb(null, obj);
|
||||
|
||||
@ -74,8 +74,7 @@ module.exports = function (strapi) {
|
||||
controllers: 'controllers',
|
||||
services: 'services',
|
||||
policies: 'policies',
|
||||
models: 'models',
|
||||
templates: 'templates'
|
||||
models: 'models'
|
||||
},
|
||||
|
||||
// Start off needed empty objects and strings.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user