Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports = createCoreService('api::restaurant.restaurant', ({ strapi }) =>
async findOne(entityId, params = {}) {
return strapi.entityService.findOne('api::restaurant.restaurant', entityId, this.getFetchParams(params));
}
});
}));
```

::: strapi Entity Service API
Expand Down Expand Up @@ -97,7 +97,7 @@ module.exports = createCoreService('api::restaurant.restaurant', ({ strapi }) =>
// Return a promise of the function that sends the email.
return transporter.sendMail(options);
},
});
}));
```

The service is now available through the `strapi.service('api::email.email').send(...args)` global variable. It can be used in another part of the codebase, like in the following controller:
Expand All @@ -121,7 +121,7 @@ module.exports = createCoreController('api::restaurant.restaurant', ({ strapi })
ok: true,
});
},
});
}));
```

::::
Expand Down