Fix 'Extending a Model Service' docs (create & update)

Signed-off-by: MattieBelt <mattiasvandenbelt@gmail.com>
This commit is contained in:
MattieBelt 2020-02-25 20:06:12 +01:00
parent c05dcec622
commit 0a22790e7b

View File

@ -97,7 +97,9 @@ module.exports = {
if (files) {
// automatically uploads the files based on the entry and the model
await this.uploadFiles(entry, files, { model: strapi.models.restaurant });
await strapi.entityService.uploadFiles(entry, files, {
model: strapi.models.restaurant,
});
return this.findOne({ id: entry.id });
}
@ -125,7 +127,9 @@ module.exports = {
if (files) {
// automatically uploads the files based on the entry and the model
await this.uploadFiles(entry, files, { model: strapi.models.restaurant });
await strapi.entityService.uploadFiles(entry, files, {
model: strapi.models.restaurant,
});
return this.findOne({ id: entry.id });
}