Skip to content

Commit

Permalink
Fix typo in controllers.md
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 3, 2020
1 parent af773f4 commit 9cc7090
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 9cc7090

Please sign in to comment.