Docs fix type singleType findOne (#8764)

* fix: typo find instead of findone for singleType

Signed-off-by: Fadhil Ahmad <fadzbobby95@gmail.com>

* refactor: remove query obj for single type

Signed-off-by: Fadhil Ahmad <fadzbobby95@gmail.com>
This commit is contained in:
Fadhil Ahmad 2020-12-04 16:59:04 +08:00 committed by GitHub
parent 57d956fb87
commit b84aa2f056
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -343,7 +343,7 @@ module.exports = {
model: 'restaurant',
// if you are using a plugin's model you will have to add the `plugin` key (plugin: 'users-permissions')
});
return this.findOne({ id: entry.id });
return this.find();
}
return entry;