mirror of
https://github.com/strapi/strapi.git
synced 2025-10-18 19:43:22 +00:00
Merge pull request #3345 from strapi/fix/rename-model
Fix model rename not using the right api name to persist files
This commit is contained in:
commit
b1e14730a2
@ -175,7 +175,7 @@ module.exports = {
|
|||||||
if (plugin) {
|
if (plugin) {
|
||||||
await Service.writeModel(name, modelJSON, { plugin });
|
await Service.writeModel(name, modelJSON, { plugin });
|
||||||
} else {
|
} else {
|
||||||
await Service.writeModel(name, modelJSON, { api: modelData.apiName });
|
await Service.writeModel(name, modelJSON, { api: name !== model ? name.toLowerCase() : modelData.apiName});
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.send({ ok: true });
|
ctx.send({ ok: true });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user