mirror of
https://github.com/strapi/strapi.git
synced 2025-09-03 05:39:36 +00:00
Fix 'Extending a Model Service' docs (create & update)
Signed-off-by: MattieBelt <mattiasvandenbelt@gmail.com>
This commit is contained in:
parent
c05dcec622
commit
0a22790e7b
@ -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 });
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user