Remove deprecated templates

This commit is contained in:
loicsaintroch 2016-02-08 11:05:06 +01:00
parent b11ae67e01
commit 95d7b61057
3 changed files with 3 additions and 17 deletions

View File

@ -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.

View File

@ -333,8 +333,7 @@ module.exports = function (strapi) {
});
return api;
}),
templates: {}
})
};
cb(null, obj);

View File

@ -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.