fixing file paths when generating APIs inside plugins

This commit is contained in:
sunnyson 2021-12-29 14:07:33 +02:00
parent 2435689d50
commit 9f4ef943e6

View File

@ -45,7 +45,7 @@ module.exports = plop => {
},
],
actions(answers) {
const filePath = answers.isPluginApi && answers.plugin ? 'plugins/{{plugin}}' : 'api/{{id}}';
const filePath = answers.isPluginApi && answers.plugin ? 'plugins/{{plugin}}/server' : 'api/{{id}}';
const baseActions = [
{