Skip to content

Commit

Permalink
Fix typo in controllers.md (#7721)
Browse files Browse the repository at this point in the history
The default SingleType service doesn't have an findOne() function only find().
See #7718 for details

Signed-off-by: Amir Lellouche <lalosher@gmail.com>
  • Loading branch information
amirc committed Sep 4, 2020
1 parent b3b335c commit f843718
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/v3.x/concepts/controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ module.exports = {
*/

async find(ctx) {
const entity = await strapi.services.restaurant.findOne();
const entity = await strapi.services.restaurant.find();
return sanitizeEntity(entity, { model: strapi.models.restaurant });
},
};
Expand Down

0 comments on commit f843718

Please sign in to comment.